I'm having the same issue. I made sure the permission was set as a child of the manifest element in the manifest file. It always fails in the emulator with the same security exception you have. I'm wondering if you have to officially install the package to get it recognized by the emulator? I just run it from eclipse with the 'run as' command.
Also, does anybody know why the 'reboot' method in the PowerManager class seems to be missing in 2.1? Regards Richard > hii ..... > > Currently i m facing a problem to switch off light in android application. > i m trying to power manager ---- gotosleep method but its giving a below > problem . > > *java.lang.RuntimeException: Unable to start activity > ComponentInfo{org.bhavesh/org.bhavesh.mainactivity}: * > * > * > *java.lang.SecurityException: Neither user 10024 nor current process has > android.permission.DEVICE_POWER.* > > but i already given a android.permission.DEVICE_POWER in manifest file. > > can any one tell me why its happened in android. yaa any other method to > off the light in android.. > > Thank you in advanced > > With Regrads > bhavesh -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en