Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable Lock Screen

Tags:

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!

like image 646
gbox Avatar asked Jan 15 '11 20:01

gbox


People also ask

Why can't I disable my lock screen?

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.

How do I turn off lock screen timeout?

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.


2 Answers

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"/> 
like image 155
Mitul Nakum Avatar answered Oct 19 '22 09:10

Mitul Nakum


You can just use this line in the activity:

getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD); 
like image 23
hsgubert Avatar answered Oct 19 '22 09:10

hsgubert