Hello,
I have a service which checks for changes to orientation sensor: since my 
service is useless when screen is locked, to save battery I would like it to 
stop checking the sensor.
I do this with a BroadcastReceiver listening for ACTION_SCREEN_OFF and 
ACTION_USER_PRESENT, and it works well except for the fact that the 
ACTION_USER_PRESENT broadcast is not emitted if the users presses a button 
in the short time after the screen is turned off but before it is locked. Is 
it intended to behave this way or is it a bug in my android version?

I try to workaround this listening also for ACTION_SCREEN_ON and then 
checking whether screen is locked or not, but I couldn't find a way to get 
this info. Is it possible?
I'm open to any suggest for any kind of solution.

Thank you

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to