Wake lock Android

To set up a wake lock on our activities:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);