Android lock screen show again after it has been disabled (using lock.disableKeyguard()) -


hey im writing launcher, in im building own custom lockscreen.

the custom lockscreen activity being launched whenever screen off (by listening intent.action_screen_off)

to disable android's lockscreen use code:

keyguardmanager keyguardmanager = (keyguardmanager) getsystemservice(keyguard_service); keyguardlock lock = keyguardmanager.newkeyguardlock(keyguard_service); lock.disablekeyguard(); 

it works good, till point, in android's lockscreen turned on again (like has never beem disabled before).

it happens lot on samsung galaxy 2 (but happens on other phones).

what im doing wrong?

thanks!

have enabled devicepolicymangnager? if not function won't work.

this comes documentation:

note: call has no effect while devicepolicymanager enabled requires password.

here tutorial it. anyway think it's not looking cause anytime app user have give password give admin permissions.

in general there no way programmatically disable keyguard ( if secure pin, password, pattern, face ) , can show activity on top of it.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -