This works for my purpose to wake up a locked, sleeping, screen off device:
PowerManager.WakeLock screenOn = ((PowerManager)context
.getSystemService(context.POWER_SERVICE))
.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK |
PowerManager.ON_AFTER_RELEASE |
PowerManager.ACQUIRE_CAUSES_WAKEUP, "example");
screenOn.acquire();
...
screenOn.release();
But SCREEN_BRIGHT_WAKE_LOCK is deprecated. What is the replacement to wake up a sleeping phone with the screen off without resorting to using Administrator level permissions?
Also, the screen wakes up of course to full brightness. I just want the screen to wake up to whatever the brightness level was before.
NOTE: This isn't a duplicate as everywhere else is only referring to DIM screen not OFF, LOCK, SLEEPING.