How to tell if user is on lock screen from service
I have simple service that running in the background and I just want to know when the user is on the lock screen or not, that way I know when to start a process. mopsled Check out a similar question asked here . Use KeyguardManager to check if the device is locked. KeyguardManager kgMgr = (KeyguardManager) getSystemService(Context.KEYGUARD_SERVICE); boolean showing = kgMgr.inKeyguardRestrictedInputMode(); 1) You need to firstly register a BroadcastReceiver in your Service to listen when power button is pressed (turns screen on/off): @Override public void onCreate() { super.onCreate();