I wanted to use the funcion goToSleep() in PowerManager Class to force
the device to sleep. But I'm getting an exception and the application
crashes when I call this function.I already have added the
DEVICE_POWER permission in Androidmanifest.xml. When I checked the
logs I could see below error:
    java.lang.SecurityException:Neither user 10018 nor current process
has android.permission.DEVICE_POWER



anybody faced this issue?
has a way to lock the phone ?




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to