tags:

views:

201

answers:

1

Hello,

I want to continue running my application when the backlight and screen goes off and lock. How do i find out whether the device screen goes off and lock from my application through notification so that i can ignore it and continue running my app.?

Appreciate your help.

+1  A: 

Everything in Android is an app, including Home and Lock screen. So your app is not running unless you have a background service. Even that can be interrupted at any time and you should not try to prevent system from doing so. It has to do with tight memory management in the Android phone. Mark Murphy wrote excellent article on that topic you can read at this link

DroidIn.net
Thanks for the great help. Done.