Determine if a Bluetooth headset is connected to the Apple Watch

I recently tried to get the WatchKit app to play the background sound effect from Apple Watchs speakers. From what I experienced (correct me if I'm wrong!) This is not possible because I need to either connect a Bluetooth headset to use WKAudioFilePlayer, or work with additional interface elements for playing sound (WKInterfaceMovie or presentMediaPlayerControllerWithURL: options: complete).

Now, instead, I would like to use WKAudioFilePlayer to play sound only if a Bluetooth headset is connected to avoid getting a β€œpair of Bluetooth headset to listen to music” - every time the headset is unavailable.

Is there a way to find out if a Bluetooth headset is connected so that I can make audio playback conditional?

+4
source share
1 answer

And yet, now there is no api to check if the Bluetooth headset is compatible with the apple clock or not

0
source

Source: https://habr.com/ru/post/1608870/


All Articles