I have three activities in my app. I want to keep the screen awake when it is in the second activity. The screen should not go off in my second activity unless the \"lock\"
try to use this
getWindow().addFlags( WindowManager.LayoutParams.FLAG_FULLSCREEN | WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);