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
  • 47,519
  • 50
  • 171
  • 296

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
  • 8,084
  • 8
  • 48
  • 62
Adam
  • 1,076
  • 1
  • 11
  • 24