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
2
votes
1 answer
How to change Screen Lock sounds settings programmatically on Android
How to change Screen Lock sounds settings (from Settings->Sounds->screen lock sounds) checkbox programmatically on Android?
For example if I want to change haptic feedback setting i'll do:
Settings.System.putInt(m_context.getContentResolver(),…

Alex
- 239
- 5
- 12
2
votes
1 answer
Are there any events before the screen got locked in Windows Phone?
As the title specifies, I want to know if any events will happen before the screen gets locked in Windows Phone 7, so that before the screen got locked I can use some combined conditions to determine setting the IdleDetectionMode to Disabled or…

ellic
- 798
- 12
- 28
1
vote
0 answers
An equivalent to an NSTimer for a background Audio app?
I have a video streaming app that is properly set up to play video via AirPlay while the device is locked or in the background. It works great. However, the one thing that doesn't work when the app goes into the background is the NSTimer I use to…

Craig B
- 4,763
- 1
- 25
- 19
1
vote
0 answers
Keep screen on (prevent screen lock) in Android TWA app
I am a web developer and have a web app (PWA) bundled into an Android app with Bubblewrap and I would like to prevent screen lock while the app is open.
I believe there is no solution involving JavaScript in the web app itself so I'd need an Android…

Thomas
- 21
- 2
1
vote
0 answers
Video: Disable preventing screen lock while playing
I have a site with a decorative autoplaying video and found that it prevents screen lock while playing. While this might be desirable in most cases in this particular case I want the screen to lock as normal since the video is not primary…

Thomas
- 8,426
- 1
- 25
- 49
1
vote
1 answer
How to keep Android screen on after an action
I could have sworn there's a simple line of code for this, but I can't find it right now.
In my app I am using a piece of custom hardware for input. I receive events (on BLE) but not as keypresses or mouse actions. What I want to do is that each…

Kibi
- 1,860
- 1
- 29
- 39
1
vote
0 answers
Custom view lifecycle when device screen is locked
I have a custom view where I want to do some actions when it gets visible or invisible to the user.
I know I can override onVisibilityChanged(changedView: View, visibility: Int) or onDetachedFromWindow functions. But these are not called when the…

Daniel
- 83
- 2
- 5
1
vote
1 answer
UWP - programmatically trigger a Windows PC Lock
I have been searching for a while for how to trigger a screen lock on windows programmatically from a UWP app, but the only thing found from MSDN is this and it doesn't even trigger a lock screen event. It creates a new lock screen.
My use case is…

esmehsnj
- 162
- 2
- 17
1
vote
1 answer
Firebase notifications on Android phone with screen lock
We develop an android app to show Firebase notification to user. The implementation is working very well in emulator everything is works fine, no problem.
When install the app to my phone:
When the phone is unlocked, app is foreground: Message…

Hosszuful
- 148
- 1
- 9
1
vote
0 answers
Ensure Android screen lock has been continuously enabled
For an Android app managing cryptographic keys, I want to ensure that the device has had a screen lock set up continuously since the first time the app has been run.
Specifically, the app will only allow using the keys if the device has a secure…

Fabian Meumertzheim
- 1,569
- 1
- 11
- 21
1
vote
1 answer
Launching Android app with physical buttons when screen is locked
Can I launch my android app when the screen is locked, with the device's physical side buttons (a combination of them is also acceptable)?

Elior B.Y.
- 191
- 2
- 9
1
vote
0 answers
Programmatically show pattern screen lock
I wrote an android app (with system privileges and Admin permission is granted).
In my application, at first time in the device, I am setting programmatically a new pattern screen lock, then running some things and then I want to close my app and to…

FarFarAwayUser
- 133
- 12
1
vote
1 answer
Is there anyway to stop screen-lock while my app is in foreground in iOS App?
I do not want the user to be able to lock the screen while app is in foreground, even when the user forcefully tries to lock the screen with hardware lock button. Is there anyway to make it function programmatically?
Please do not tell me…

Prabhat Singh
- 176
- 2
- 12
1
vote
1 answer
A better way to prohibit activity rotation to portrait mode after screen is locked?
It is one of Android's idiocies that after the screen is locked while an app/activity is in landscape mode, it will be destroyed and re-created although the user will often keep the device in the same position and will unlock it a short time later.…

Andi
- 457
- 3
- 19
1
vote
0 answers
Get auto brightness value and auto lock time value
Hi i'm trying to get 2 value from iOS device,it doesn't really matter what OS version is it.
I need to get if the device's auto brightness is enabled/disabled and the second value of the auto lock screen.
I read over the internet that it is not…

Zach Bublil
- 857
- 10
- 28