I’d like to disable/delay the lock screen programmatically. In looking into this, KeyguardManager is depreciated/doesn\'t work consistently,
disable/delay
KeyguardManager
the answer of @nandeesh is working but it's deprecated , to disable lock screen use flags :
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);