Add this code into your Activity :
KeyguardManager keyguardManager = (KeyguardManager)getSystemService(Activity.KEYGUARD_SERVICE);
KeyguardLock lock = keyguardManager.newKeyguardLock(KEYGUARD_SERVICE); lock.disableKeyguard();
In androidmanifest add this permission:
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"></uses-permission>
No comments:
Post a Comment