Android Question How come service can pause?

dreamworld

Active Member
Licensed User
Longtime User
I got a strange error.
I started a service and let a timer to connect server from time to time. Before each connection, a notification would show. However, when the screen was off, the timer paused and no notifications any more. When the screen was on, the timer started to work again, pushing notifications.
This is really strange.
As far as I know, service can not pause, hence timers in a service will not pause too.
 

dreamworld

Active Member
Licensed User
Longtime User
The timer did not raise tick event, when screen was off.
It was in a service, not an activity.
When screen was on, it resumed raising tick event. The screen was still locked.
 
Upvote 0
Top