Lock phone using a android application -
possible duplicate:
lock android device programatically
i trying lock phone using application,
i have tried following code, no use,i inserted user permissions too.
keyguardmanager manager = (keyguardmanager) getsystemservice(context.keyguard_service); keyguardlock lock = manager.newkeyguardlock("hh"); lock.disablekeyguard(); lock.reenablekeyguard();
please suggest me code lock phone.
add permission in androidmanifest.xml
file
<uses-permission android:name="android.permission.disable_keyguard"/>
and
keyguardmanager mgr = (keyguardmanager)getsystemservice(activity.keyguard_service); keyguardlock lock = mgr.newkeyguardlock(keyguard_service); lock.reenablekeyguard();
Comments
Post a Comment