I’d like to disable/delay the lock screen programmatically. In looking into this, KeyguardManager is depreciated/doesn\'t work consistently,
disable/delay
KeyguardManager
Did you try this?
KeyguardManager keyguardManager = (KeyguardManager)getSystemService(Activity.KEYGUARD_SERVICE); KeyguardLock lock = keyguardManager.newKeyguardLock(KEYGUARD_SERVICE); lock.disableKeyguard();
Add
You can disable the keyguard using this.