HI all, Can we switch of the phone programmatically..?Please let me know how to do this..?
An my second question is..
how to lock and unlock the screen in android?
i am using following snippet but it didnt worked for me..
KeyguardManager keyguardManager = (KeyguardManager) getSystemService(Activity.KEYGUARD_SERVICE);
KeyguardLock lock = keyguardManager.newKeyguardLock(KEYGUARD_SERVICE);
lock.disableKeyguard(); // to disable
lock.reenableKeygaurd();// to enable
and i used the permission also.. Help me to do this in correct way..thanks in advance