This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
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?