I have a service that detects when the display of my Android phone is on or off. When it is turned off, the service invokes an operation that uses dispatchKeyEvent to determine when the volume up button is pressed. Unfortunately, apparently, the activity cannot be performed when the screen is off. (See this post.)
I noticed, however, that something at some level is detecting this event since the following LogCat message appears when I press the volume up button when the screen is off: "CatService: Return current sInstance". The message seems to be device-specific, since on the other device something else appears in the log, but only the first device bothers me.
I did some research at CatService, but did not find much and cannot figure out how I can use it, or something that generates a log message to detect the volume up button. I would appreciate any light anyone could shed on it.
source
share