When you install the apk (using the normal install gui rather than adb) does it report the permission?
That might be one of the leftovers from 1.0/1.1 versions. A lot of functions were removed due to the possibility of them being abused. Powering off the device would definitely qualify as something that could be abused... imagine somebody writing a SERVICE that will randomly shut the device off. It would probably look to the user that the OS was faulty even though it is some crap they installed. On Jul 16, 2:27 am, LeoSnowland <[email protected]> wrote: > 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 > > Caused by: java.lang.SecurityException: > Neither user 10018 nor current process has > android.permission.DEVICE_POWER." > > anybody faced this issue? > how can i make the cup go to sleep? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Discuss" 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-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
