How can I disable the keyguard when a broadcast receiver is activated by screen_on, so that when it occurs the user sees an activity that I have started behind it? (The activity is running already...)
I have been trying the following code from a broadcast receiver triggered by screen off...
KeyguardManager myKeyGuard = (KeyguardManager)getSystemService(Context.KEYGUARD_SERVICE);
myLock = myKeyGuard.newKeyguardLock();
myLock.disableKeyguard();
It doesn't seem to be working though as it is. When I turn the screen on, I still have to manually unlock the keyguard on the phone to reveal the activity behind it.