Is there a way to keep my device awake for a long time?
Using the config_minimumscreenofftimeout
config will allow you to configure how long the device waits before falling asleep.
You can also use Android APIs for this, in certain cases. Learn more about Android wakelock