Android Headphone Jack

Possible duplicate:
Android: test headphone connection

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

+3
source share
1 answer

You want to set up your BroadcastReceiver by looking for the intent "ACTION_HEADSET_PLUG".

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

+2
source

Source: https://habr.com/ru/post/1746414/


All Articles