Have several activities in my app. I would like to automatically return to main after a period of inactivity throughout the app. Am not sure what approach to take. Perhaps a global variable that resets to 0 every time any activity or view is touched/clicked, etc, then a timer that ticks occasionally to increment the value of the variable, then starts the main activity when it reaches a certain value?? Can you run a timer as a service? Also, is there a way detect touching/clicking throughout the app without having to add code to each every sub?