I have an Android (version 1.5) application which needs to be constantly running when a button is pressed. So, when a Button is pressed I would like the phone to remain on and not want the screen or CPU to time-out.
When another Button is pressed I would like the phone to be back to normal and time-out as per user settings.
Update: As suggested by Steve Pomeroy, this might be a better way to do it.
You can use a
WakeLockthat requires the following permission:Here is how you aquire and release a
WakeLock:Depending on your requirements you might be able to use a different type of
WakeLock.