Keeping the screen awake can be accomplished by using a wakelock by
mWakeLock = mPowerManager.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK,
Wakelock is vague, since it has many different options. The flag FLAG_KEEP_SCREEN_ON only does that.
| Flag Value | CPU | Screen | Keyboard |
-----------------------------------------------------
| PARTIAL_WAKE_LOCK | On* | Off | Off |
| SCREEN_DIM_WAKE_LOCK | On | Dim | Off |
| SCREEN_BRIGHT_WAKE_LOCK | On | Bright | Off |
| FULL_WAKE_LOCK | On | Bright | Bright |
Please see wakelock or PowerManager for Android specifics, and other answers for the exact implementation.