Disable Lock Screen

I am looking for a way to replace the stock lock screen (with an app, not a rom).
What is the best way to do it, for a start to disable the lock screen on as much devices as possible?

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

KeyguardManager keyguardManager = (KeyguardManager)getSystemService(Activity.KEYGUARD_SERVICE);
KeyguardLock lock = keyguardManager.newKeyguardLock(KEYGUARD_SERVICE);

in androidmanifest:

<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>

Solution 2

You can just use this line in the activity:


Solution 3

Try this, it will keep awake the screen/ display , as long as the activity is on top.


Also this does not require any permission in manifest.

Solution 4

Check out this link http://thinkandroid.wordpress.com/2010/01/24/handling-screen-off-and-screen-on-intents/

listen to the screen on intent and I guess just launch your lock screen.

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply