3

I'm making an application that run in background after install and do some task as volume down key is pressed at any point of time in Android. I have created a service of it but it doesn't listen to key event as application closes and run in background. Application is not for media player.

halfer
  • 19,824
  • 17
  • 99
  • 186
  • Check this [question](http://stackoverflow.com/questions/12792606/android-listener-for-hard-keys-press-at-background) – Plato Jun 23 '13 at 12:45

1 Answers1

-1

See the following: Volume change Listener: Is registerMediaButtonEventReceiver preferable to onKeyDown?

You can register to this event from a service and that should do the work for you.

Community
  • 1
  • 1
Lior Ohana
  • 3,467
  • 4
  • 34
  • 49