A screen lock is a software feature that keeps users from accidentally sending input to a device. For iPhone, there's "Slide to Lock" and for Android there are many variations. The point of a screen lock is for the device to be sure that the user is consciously interacting with the device as opposed to, for example, pocket-dialing. Similar to a key guard. They can also provide an extra layer of security by asking for a pin or a gesture.
Questions tagged [screen-lock]
136 questions
60
votes
8 answers
How to lock Android screen via ADB?
Is there a way to lock the Android screen via the ADB?
I find ways to lock the display in an apk, but I want to lock the screen from the PC via ADB, to simulate a display timeout, without having to wait for the timeout.
Is it possible to do…

PurpleDiane
- 1,693
- 1
- 12
- 15
31
votes
3 answers
Programmatically detect whether iOS passcode is enabled or not
Rather than build a passcode directly into my app and potentially require the user to enter a passcode twice (once for the device and again for my app); I thought I might out-clever myself and do something along the lines of:
if (device has…

Eric
- 3,865
- 4
- 32
- 44
19
votes
3 answers
Ubuntu: Do NOT lock the screen when pressing Super+L
Whenever I press Super+L (or Win+L) on my Ubuntu 14.04 Desktop, the screen gets locked. I would like to disable this behaviour. In System Settings->Keyboard->Shortcuts->System there is a shortcut configured for Lock screen: Ctrl+Alt+L. It works. But…

user1785730
- 3,150
- 4
- 27
- 50
18
votes
6 answers
Start Activity screen even if screen is locked in Android
How to start an Activity on device even if screen is locked. I tried as below but it's not working.
Broadcast receiver:
Intent alarmIntent = new Intent("android.intent.action.MAIN");
alarmIntent.setClass(context, Alarm.class);
…

yuva ツ
- 3,707
- 9
- 50
- 78
17
votes
6 answers
How to disable home button in Android like lock screen apps do?
I know this question is asked many times but I found that none of the solution is working.
I tried the code given below...
protected void onPause() {
super.onPause();
Intent intent = new Intent(this,LockActivity.class);
…

Ruag
- 189
- 1
- 2
- 15
14
votes
5 answers
How can i set up screen lock with a password programmatically?
Is there any one that can help me with a code to set a password to lock the screen ? thx

emna
- 423
- 2
- 6
- 18
10
votes
1 answer
How to lock the camera in Google Maps API V2
I'm trying to lock the camera so that the users can't move the map. Is there any method available for that? I tried to find it, but untill now I haven't found it yet. I also tried to find any related question for this.

Aerial
- 1,185
- 4
- 20
- 42
9
votes
1 answer
How to start activity after unlock btn press & before unlock screen appear?
I want to do as below:
User press hard unlock button. After pressing unlock button my activity is start. After close my activity using close button on screen user prompt to enter pattern lock(or pin lock). after enter right pattern lock home screen…

Mohit Kanada
- 15,274
- 8
- 31
- 41
8
votes
3 answers
Detect Lock Screen Incorrect Password by user in Android
I am building a security app and I need to know if the user is giving incorrect password . Suppose user phone is locked by pattern lock system , and unfortunately user has forgotten the pattern password.When user give wrong pattern 5 time, there…

user2166895
- 81
- 1
- 1
- 7
8
votes
1 answer
how to show the missed call number in lock screen?
I have make an app that can show missed call when screen is locked,but I don't know how to show number of missed call on the locked screen.the call image is from MultiWaveViewwhich has defined already,I have trid using OnDraw,with Canvas and…

Amour Ring
- 141
- 7
7
votes
5 answers
Prevent a hidden status bar from reappearing after screen lock
i want to hide status bar in my application to make it fullscreen, so i use this example Hide Notification bar - it works fine. But if i lock the screen and then unlock it, the status bar appears, how to solve this problem?

user1049280
- 5,176
- 8
- 35
- 52
7
votes
1 answer
"FINGERPRINT_ERROR_CANCELED" error in custom view android
i am trying to implement finger print to unlock or remove the locked view by finger print authentication using existing enrolled finger prints by sensor to show contents further but fingerprint authentication working fine in normal activity but not…

Muhammad Natiq
- 213
- 5
- 14
7
votes
2 answers
Allow input from bluetooth keyboard even if screen locked
I'm developing an application that lets the user scan barcodes using an external barcode scanner connected via bluetooth. The barcode scanner acts as a keyboard, i.e. Android thinks that the scanned barcodes have been typed on a keyboard.
The app is…

Baz
- 36,440
- 11
- 68
- 94
6
votes
0 answers
Jupyter notebook stops running when screen locked (not sleep mode)
When I leave my script in Jupyter Notebook for a while, it apparently pauses running. The computer itself is not going to sleep mode (I made sure that I put "Never go to sleep on battery power"), but the screen locks. I use: Windows 10 on Microsoft…

Valentin Slepukhin
- 61
- 3
5
votes
1 answer
Check if user has configured a screen lock method (PIN/biometric/pattern/etc) using Flutter?
I want to check if the user has any type of screen lock set on their device (PIN, fingerprint, face, pattern, etc.).
I don't want to simply check if the device is capable of for example biometrics, nor detect (from the background) if the device is…

Magnus
- 17,157
- 19
- 104
- 189