In my application I am using disableKeyguard and reenableKeyguard to Unlock and lock a screen. my application is working fine. But problem is when user unexpectedly unlocked a screen by dragging keygaurd (without using my application), the screen does’t lock again with my application.
How to solve this problem?
Thanks in advace
Use
FLAG_DISMISS_KEYGUARDand/orFLAG_SHOW_WHEN_LOCKEDinstead; this allows you to seamlessly hide the keyguard as your application moves in and out of the foreground and does not require that any special permissions be requested. Handle returned bynewKeyguardLock(String)that allows you to disable / reenable the keyguard.