Android Question Detecting headphone jack in/out


Licensed User
Longtime User
I want to check if a headset is plugged in.
and take action on this state (an msgbox or som other action).

Erel said it is possible with BroadCastReceiver
he showed this example

See the example here:

The action you should add is: "android.intent.action.HEADSET_PLUG"
But i don't know how to do this.

I want to know when a headset is plugged in or out seperaty. is this possible?