This mobile phone feature allows the user to disable (lock) the keys so that a number will not accidentally be dialed while the phone is in your pocket or purse. A special key combination, unlikely to be pressed accidentally, is typically used to unlock the keys.
Questions tagged [keyguard]
147 questions
3
votes
4 answers
Unlocking the emulator or device for Android test
I am writing Android functional tests. I need the device to be awake and the application to be visualized in order for them to work. I have consulted with Android developers for that. However, there are several problems with the proposed…

Boris Strandjev
- 46,145
- 15
- 108
- 135
3
votes
1 answer
With security keyguard active transition between activities is weird
I have my main activity A and when the user presses a button i open another activity B. But when this happens B doesn't just appear on top of A:
A disappears
secure keyguard shows up
B appears
And when i get rid of B the same thing happens. This…

Sandman
- 2,577
- 2
- 21
- 32
3
votes
0 answers
Opening a url on browser from an activity on KeyGuard
I have an activity that runs on the top of my secured lockscreen/ keyguard (The pattern key guard). The top view of the activity has the following flags:
getWindow().addFlags( WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD …

user2934804
- 93
- 6
3
votes
0 answers
Find out which keyguard-type a user is using
DevicePolicyManager.lockNow() only works if the user is not using the "Slide"/"None"-lockscreen (on some devices). Thus, I'd like to find out which lockscreen-type (None/Slide/PIN/Pattern/Face-Unlock) the user is currently using. Is this possible…

Nick
- 3,504
- 2
- 39
- 78
3
votes
1 answer
Keyguard Manager not working properly
I am using Keyguard Manager in my activity to unlock the device, but it is behaving strangely. I tested it with two devices, on Nexus its working fine but in samsung Galaxy S, it's not working.
My Code is:
PowerManager pm = (PowerManager)…

Meenal
- 2,879
- 5
- 19
- 43
3
votes
1 answer
Android: Can't re-enable the keyguard after disabling it
I'm trying to create an option (using check box preferences) in my app for the user to disable and re-enable the lock screen. I use disableKeyguard() to disable the lock screen and it works flawlessly but I can't get reenableKeyguard() to work. The…

Jasjit Singh Marwah
- 730
- 8
- 31
2
votes
1 answer
Android Screenlock/Keyguard after Startup without SIM card
I am developing for the HTC Desire HD Android 2.3.3 API10.
I have an app registered as homescreen which now finally starts up nicely after booting.
Problem is, there is a Keyguard right after booting up, which is telling me there is no SIM card…

antion
- 33
- 6
2
votes
0 answers
How to show an activity in front of key guard(with pin locked)
I found Gtalk coming call can show in tablet when tablet is screen off and locked with pin Key guard.
But I don't know why? Any one can help?
add following tag in onCreate(..) function of an activity can do it. But it need the activity is full…

user1069014
- 21
- 2
2
votes
1 answer
keyguardManager.createConfirmDeviceCredentialIntent() returns RESULT_CANCELEDon Android Q
I have an application, where I'm requesting user to Authenticate in my app via KeyguardManager using PIN.
The important thing is that I have android:showOnLockScreen="true" to my activity in manifest, so when device is locked, and my activity is…

Hayk Nahapetyan
- 4,452
- 8
- 42
- 61
2
votes
0 answers
How to receive a log of recent screen unlocks?
I’m writing an app where I’d like to request the user put in their passcode (KeyguardManager.createConfirmDeviceCredentialIntent), but only if the device has been unlocked for more than X amount of time.
In iOS, this is called…

Steven L
- 15,304
- 1
- 21
- 16
2
votes
0 answers
Intent flags not working when calling createConfirmDeviceCredentialIntent()
I'm having trouble trying to get some custom behavior from the KeyguardManager API, particularly the createConfirmDeviceCredentialIntent() method. According to the docs, it's used to:
Get an intent to prompt the user to confirm credentials (pin,…

deMouser
- 369
- 1
- 2
- 14
2
votes
1 answer
How to find out unlock method programmatically?
For the Android OS, I need to find out what the user uses to unlock the device. Be it null, PIN, pattern, fingerprint.

theAnonymous
- 1,701
- 2
- 28
- 62
2
votes
2 answers
StandOut window not shown during incoming call when key guard is set in Marshmallow
I am using Mark Wei's incredible library StandOut in my app:
http://pingpongboss.github.io/StandOut/
What I am doing is very similar to TrueCaller App
Which is displaying my own view upon an incoming call.
This generally works great.
What is my…

Nom1fan
- 846
- 2
- 11
- 27
2
votes
0 answers
FLAG_DISMISS_KEYGUARD no longer working on Android with custom Locker
I have two nexus 4 in 5.1.1.
One have the go locker and the other Google launcher.
I launch activity with alarmmanger and in the activity I have this:
getWindow().addFlags(
WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD
…

Jenjen
- 21
- 2
2
votes
2 answers
Lollipop screen black out when pressing the Home button after unlock keyguard
I am facing the issue mentioned here, Screen Blackout. Am not able find solution for it, Let me know if there is a way to fix it.

Theja
- 744
- 1
- 7
- 24