Android/TurnScreenOnOff

Permissions
You will need these permissions 

Turning the Screen Off
Apparently they are unreliable, but they have some explanatory value about how the PowerManager is interacting with the display and screen.

PowerManager manager = (PowerManager) getSystemService(Context.POWER_SERVICE); // Choice 1 manager.goToSleep(int amountOfTime);  // Choice 2 PowerManager.WakeLock wl = manager.newWakeLock(      PowerManager.PARTIAL_WAKE_LOCK,       "Your Tag"     ); wl.acquire; wl.release;

// Choice 3

WindowManager.LayoutParams params = getWindow.getAttributes; params.flags |= LayoutParams.FLAG_KEEP_SCREEN_ON; params.screenBrightness = 0; getWindow.setAttributes(params);