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\"
I find this solution much easier:
// Add this line
Just add this to your activity layout XML.