1

How do you use ACTION_HEADSET_PLUG?

view story
linux-howto

http://androidforums.com – I am working on an android application and I want to detect whether the headset is plugged in or not. I found the ACTION_HEADSET_PLUG thing, but I don't understand how to use it, and everything I have tried has not worked yet. I tried adding <receiver android:enabled="true" android:name=".AudioJackReceiver" > <intent-filter> <action android:name="android.intent.action.HEADSET_PLUG" > </action> </intent-filter> </receiver> To my manifest, and I made (General)