Hi,
This is my first post so please forgive any errors.
I am making an app that locks your phone at a voice command.
Sadly, I cannot even get the phone to lock.
This is the code I am using:
KeyguardManager mgr = (KeyguardManager)getSystemService(Activity.KEYGUARD_SERVICE);
KeyguardLock lock = mgr.newKeyguardLock(KEYGUARD_SERVICE);
lock.reenableKeyguard();
The app doesnt even install.
If anyone can tell me how to lock the phone trough code please reply
Thanks
Raghav Sood
This is my first post so please forgive any errors.
I am making an app that locks your phone at a voice command.
Sadly, I cannot even get the phone to lock.
This is the code I am using:
KeyguardManager mgr = (KeyguardManager)getSystemService(Activity.KEYGUARD_SERVICE);
KeyguardLock lock = mgr.newKeyguardLock(KEYGUARD_SERVICE);
lock.reenableKeyguard();
The app doesnt even install.
If anyone can tell me how to lock the phone trough code please reply
Thanks
Raghav Sood