How to wakeup android phone from sleep (suspend to mem) programmably? I don\'t want to acquire any wakelock, which means the phone goes into \"real\" sleep with the cpu disabled
In order to let the Activity wake up the device and not require a password/swipe, you only need to add a few flags. To get that, include to your code:
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN |
WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD |
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED |
WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON,
WindowManager.LayoutParams.FLAG_FULLSCREEN |
WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD |
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED |
WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
This will wake up your App activity.