Does anyone know how I can detect if the headphone jack on a device is unplugged on Android? I have a music player and I need to pause the music when the headphones are unplugged. The closest thing I have found is using the AudioManager. Is that the right direction to go?
Does anyone know how I can detect if the headphone jack on a device
Share
This is what I ended up doing:
I found the answer at this link: http://developer.android.com/training/managing-audio/audio-output.html