On my Android, the max screen time out is 10 minutes which really doesn't help when I am running map navigation. Looking at the API it seems manipulating the Settings.System.SCREEN_OFF_TIMEOUT to -1 should set the display to permanently stay on.
I am thinking the application would have a home screen icon. Touching it would toggle between stay on/whatever time out limit existed before. To achieve this, what should I be writing? Activity? Widget? How do I achieve this functionality, where some code is executed without showing any UI?