views:

25

answers:

1

Hey guys,

Is there a way to capture a key event from the Menu button using an Intent or BroadcastReceiver?

Basically I want my app's Service to be activated when the Menu key is pressed.

Thanks

A: 

Just check the KeyDownEvent if the Menu Button was pressed: http://developer.android.com/reference/android/view/KeyEvent.Callback.html#onKeyDown%28int,%20android.view.KeyEvent%29

Roflcoptr
@Roflcoptr I need to be able to capture this event without my app running. Hence why I'm wondering if there is a way for my app to be activated via an Intent or BroadcastReceiver :P
mlevit
Ah ok now i understand. I dont think this is possible. And if, it isn't very userfriendly and I would really rethink if you want to do that.
Roflcoptr