[android-developers] R: How to know if screen is locked

2011-07-10 Thread Federico Pelloni
Anybody? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options,

Re: [android-developers] R: How to know if screen is locked

2011-07-10 Thread Federico Pelloni
Thank you very much, together with ACTION_SCREEN_ON it works perfectly. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to

[android-developers] Intent.ACTION_USER_PRESENT is not triggered before screen lock

2011-07-08 Thread Federico Pelloni
I have a service running in background that checks the orientation sensor, I'd like it to stop checking when screen is locked as my service does nothing useful then. I've done this with a BroadcastReceiver which listens for ACTION_SCREEN_OFF and ACTION_USER_PRESENT. While the first works well, I

[android-developers] How to know if screen is locked

2011-07-08 Thread Federico Pelloni
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