I want to be able to capture key events inside a service I am writing. I can do this inside an activity without problems, but all my attemps to get this working in a service
A Service has no UI so it doesn't receive any input from the User.
Now if you had an activity that managed the service then you could make the service do something special when the back key was pressed while in your activity.