views:

54

answers:

1

Hello,

I need an event executing when user plugs in/out wired headphones, it made in HTC sense player.

android.media.AudioManager doesn't generate an event, it even doesn't return a correct value with isWiredHeadsetOn()

How can i know if wired headset plugged or not?

A: 

Try ACTION_HEADSET_PLUG.

CommonsWare
how ican use it?
Spin7ion
@Spin7ion: Create a `BroadcastReceiver` that will listen on broadcast `Intents` with that action.
CommonsWare