Question mainly on design.
In my game i have a timer that give the user something each x minutes. After triggering, it starts again. Currently i use count down timer and utilize the onTick and onFinish.
The problem is that i dont want this timer to work when app goes to background. The obvious solution will be to stop it on the onPause call back - the problem is that my app have multiple activities and i dont want to stop/start the timer on each activity change.
Is there other class better for that use-case? how can i make detect app goes to background?