Keep screen on.
Every HaxeFlixel written game I've come across keeps the device from sleeping, except my own games.
Even though the permissions show "Prevent phone from sleeping" my games still go to sleep.
So what's the secret to keeping the screen on?
EDIT: I should maybe mention this is on Android 5