Android: Detect Headphones As Well As Headset?
I've got my code working using the isWiredHeadsetOn() method in AudioManager as long as I use the headset that came with my phone. If I use a pair of headphones without an inbuilt
Solution 1:
The best way is to use a broadcast receiver for ACTION_HEADSET_PLUG. Then you get events when the headset is connected or disconnected.
I think it should work for bluetooth devices but am not 100% sure to be honest.
Post a Comment for "Android: Detect Headphones As Well As Headset?"