Nexion
Nexion

Reputation: 433

Android: OnKeyListener implemented Service onKey not being called

So as the title says, I have a Service which Implements OnKeyListener to receive keys in the background to increment some values in my achievement database.

My problem is onKey isn't being called (the service is being created and started and everything)

http://pastebin.com/ne6mV7zs

Am I going about this the wrong way?

Upvotes: 0

Views: 1508

Answers (1)

user1080894
user1080894

Reputation:

Android services are unable to respond to Key Listeners because they have no visible manifestation, they run in the background. If you want more information, have a look at this post:

Is it possible to create an Android Service that listens for hardware key presses?

Upvotes: 1

Related Questions