Hi,

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

"E/AndroidRuntime( 2158): Caused by: java.lang.SecurityException:
Neither user 10
020 nor current process has android.permission.DEVICE_POWER."

Has anyone faced this issue before. Does application have
DEVICE_POWER permission. or is it disabled.

Regards,
Manoj
--~--~---------~--~----~------------~-------~--~----~
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