M. Schwarze
M. Schwarze

Reputation: 59

Android Studio: Countdown timer which is also running when the app is closed

I want to make an app where you can upgrade your character. When you do this you have to wait, for example 5 days. My question is how can i modify the countdown timer that the timer is also running when the app is closed?

Upvotes: 0

Views: 105

Answers (1)

am110787
am110787

Reputation: 316

As mentioned by Bob you can use AlarmManager to run service and check. The other way is to save the last update date in shared preference and check the time difference when user tries to upgrade again.

Upvotes: 1

Related Questions