I know that while my app has focus I can capture this event:
If KeyCode = KeyCodes.KEYCODE_HEADSETHOOK
but I need to capture this event in a service even when my app is not in focus (not in the foreground)
does anybody know the best way to accomplish this?
If KeyCode = KeyCodes.KEYCODE_HEADSETHOOK
but I need to capture this event in a service even when my app is not in focus (not in the foreground)
does anybody know the best way to accomplish this?