Play haptics on Watch in background during workout session when bluetooth headphones connected

I am working on a watchOS6 workout app that uses haptic notifications during the workout. These notification are to prompt a user to change their pace.

It is configured to run a workout session and haptics work when running in the background. However, if bluetooth headphones are connected to the apple watch, then you only get the haptic vibration OR the audio chime for the haptic, depending on whether the app is currently showing on the watch face or running in background.

Here's how I'm playing the haptic:
Code Block
WKInterfaceDevice.current().play(.notification)


My audio session is configured with these options
Code Block
try session.setCategory(.playback, options: [.duckOthers])


Is it possible to get the haptics to play which the app is not in the foreground and the user has bluetooth headphones attached?
Answered by dhruvmathur in 617312022
Thanks for your question radox. Unfortunately it is not possible to do so. The Watch (while connected to Bluetooth headphones) is to only play audio, and not play haptics if the app is backgrounded. It is also expected for the Watch to only play haptics when the app is foreground running and connected to Bluetooth headphones. When headphones are connected, we'd like to notify the user in one way, either haptic or audio (depending on the state of the app), to avoid redundant notifications during the HKWorkoutSession.
Accepted Answer
Thanks for your question radox. Unfortunately it is not possible to do so. The Watch (while connected to Bluetooth headphones) is to only play audio, and not play haptics if the app is backgrounded. It is also expected for the Watch to only play haptics when the app is foreground running and connected to Bluetooth headphones. When headphones are connected, we'd like to notify the user in one way, either haptic or audio (depending on the state of the app), to avoid redundant notifications during the HKWorkoutSession.
Thanks for confirming this is intended behaviour.
Play haptics on Watch in background during workout session when bluetooth headphones connected
 
 
Q