• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Getting headphone button push event

diegoesp

Lurker
Hi everyone,

is there any way to detect when the user pushes the headphone button from code ? (via an intent, maybe ?). I just can't find the way to do it.

For example, the music player stops playing when it's pressed.

Thanks !
 
Back
Top Bottom