I want to use earphone key event to make some event handling on that. I haven't tried it at all because i don't have any base for this type of event handling.
Asked
Active
Viewed 504 times
3
-
Did you find a solution for this? – Antrromet Aug 23 '15 at 01:59
1 Answers
0
Use the ACTION_MEDIA_BUTTON
and ACTION_AUDIO_BECOMING_NOISY
(volume loud control).
But be aware that you shouldnt have another headset app running in the background as it can take a higher priority over yours. Refer this for more details on the know how's

Community
- 1
- 1

Vrashabh Irde
- 14,129
- 6
- 51
- 103
-
I want to use button of my mobile earphone which is used to receive/make a call(by pressing button once) and to start/pause music(by pressing button twice immediately). I want to listen long key press event of earphone. – Bhupesh Jul 02 '13 at 07:43