<How can I keep a countdown timer running even if ...
# stackoverflow
u
How can I keep a countdown timer running even if I don't open the app for a long time? I've been making a timer app using CountDownTimer, and now I'm testing if it works properly. However, if I set a bit longer period, for example 1h30m, and close the app, it stops working, and when I open the app, it shows the initial screen, the timer I set disappears. I tried to turn off "Battery Optimization" in this app. I tried to turn on "Background Work" in this app. But they didn't work.