Putting the system to sleep on Android
<p>I'm developing an application for Android 1.6 and newer which contains a functionality that switches the phone to sleep.</p>

<p>I tried to find a way of how to do that and I found the <strong>goToSleep</strong> method in the <strong>PowerManager</strong> class, but unfortunately the usage of that method requires <strong>android.permission.DEVICE_POWER</strong> permission which is a system level permission allowed only for system apps only.</p>

<p>Does anybody know an alternative way of forcing the phone to go into sleep mode or how to sign an application to gain the above mentioned permission and to allow the usage of the <strong>goToSleep</strong> method? Thank you!</p>
