3

Possible Duplicate:
Android: Checking if headphones are plugged in

Is there a way to check if earphones are connected to the Android device? Some kind of audio routing property or something?

Community
  • 1
  • 1
Icemanind
  • 45,770
  • 48
  • 167
  • 283

1 Answers1

2

You'll want to set up a BroadcastReceiver, looking for the "ACTION_HEADSET_PLUG" Intent.

https://developer.android.com/reference/android/content/Intent.html#ACTION_HEADSET_PLUG

Vadim Kotov
  • 7,766
  • 8
  • 46
  • 61
Adam
  • 1,078
  • 1
  • 11
  • 24