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? Thanks!
On most versions of Android, choose Security & privacy, Security, or Security & location. Find the option to set your lock screen access code. Usually, this will be Lock screen password or Screen lock. You should now be able to choose the option to disable your lock screen.
Click on the “Change advanced power settings” link at the bottom of the page. A new window should pop up. Scroll down until you see Display, then click on the plus icon to expand the section. Change “Console lock display off timeout” to the number of minutes you want before your lock screen goes into a timeout.
KeyguardManager keyguardManager = (KeyguardManager)getSystemService(Activity.KEYGUARD_SERVICE); KeyguardLock lock = keyguardManager.newKeyguardLock(KEYGUARD_SERVICE); lock.disableKeyguard();
in androidmanifest:
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
You can just use this line in the activity:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With