I want to send device to sleep or turn the screen off. I have investigated and found this topic: Turn off screen on Android
Basically, the are three ways to do it, b
My application already does this fine, I found this in my PowerManager.class
/**
* Force the device to go to sleep. Overrides all the wake locks that are
* held.
*
* @param time is used to order this correctly with the wake lock calls.
* The time should be in the {@link SystemClock#uptimeMillis
* SystemClock.uptimeMillis()} time base.
*/
public void goToSleep(long time)
{
try {
mService.goToSleep(time);
} catch (RemoteException e) {
}
}