Turning the system on standby on Android

I am developing an application for Android 1.6 and newer that contains functionality that puts the phone in sleep mode.

I tried to find a way how to do this, and found the goToSleep method in the PowerManager class , but unfortunately android.permission.DEVICE_POWER is required to use this method , system level permission is allowed only for system applications.

Does anyone know an alternative way to make the phone go into sleep mode or how to sign an application to get the above permission and allow the use of the goToSleep method ? Thank!

+1
source share
1 answer

I am developing an application for Android 1.6 and newer that contains functionality that switches the phone to sleep.

AFAIK, which is not supported by the Android SDK for regular applications.

or how to sign an application to get the above permission and allow the use of the goToSleep method?

This requires you to compile and install your own firmware.

+5
source

All Articles