I'm trying to make an app that warns you when you stop using your phone for a while (so I dont stop doing my work). The functionality would be similar as a screensaver, after some minutes of inactivity would pop a annoying message. So, I made a service and I try to detect a onUserInteraction() to restart a timer that pops the massage, but that doesn't seem to work like would in a activity. Are there other ways of detecting inactivity or a more intelligent way to do this thing? thank you very much.
Asked
Active
Viewed 478 times
1
-
you really ought to post some code from your attempt. – jeremyjjbrown Feb 08 '14 at 03:46
1 Answers
0
You could register for the " android.intent.action.SCREEN_ON" intent in your manifest, and set a timer with AlarmManager
.

ross.squires
- 405
- 3
- 13