Detecting if a BT headset is connected

All your problems with Audio, Video and Images.

Detecting if a BT headset is connected

Postby btdownloads7 » Wed Nov 10, 2010 5:39 pm

I made an app that plays back audio files, and has an option to switch the audio path between the headset, speaker, and a BT headset. However, I can't figure out a way to have the app detect if there is a BT headset connected. I can check if BT is enabled or disabled, and I can check if there are any devices paired, but not if any are connected. The only thing I can do for now is use a BroadcastReceiver to see when the "android.bluetooth.headset.action.STATE_CHANGED" broadcast is made and check if it's connected. However, this only work when the headset is connected or disconnected. I'd like a solution that would let my app check th BT headset state whenever it needs to. How can this be done?
Posts: 2
Joined: Tue Oct 26, 2010 12:40 pm


Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 9 guests