modernrefa.blogg.se

Countdown app iphone
Countdown app iphone













countdown app iphone

Other timer apps can pop up background notifications just fine. I could easily accomplish this with foreground timers, but then I would need to force my phone to never go to sleep, and it would only work while this app was in the foreground, which is not always possible on a phone. I could create an action on the notification, which if the user pressed would restart the timer, but for this purpose, I need the timer to automatically restart immediately, even if the user ignores it.

#Countdown app iphone full

I need to be able to create notifications that are repeating, and yet switch to the full duration once the "remaining" time has expired. So if I put the app in the background, I will get a notification that the time has elapsed, but it won't automatically start a 5 minute countdown, it will instead just go back to 2 minutes. For example, if it is a 5 minute timer, that is paused with only 2 minutes left, when it is resumed, it is set up to be a 2 minute countdown timer.

countdown app iphone

Then when it is resumed, a notification needs to be recreated with the remaining time. I'm trying to make a simple app that fires off an alarm every 7 minutes (configurable of course) whether the app is in the foreground or not.Īlthough it was easy enough to just make a hardcoded repeating timer that does this, adding any kind of front end interface seems to throw a wrench into my strategy, suggesting to me that maybe I am taking the wrong approach entirely.įor example, if I just have a start / stop button, pausing an existing timer needs to cancel the background notification, but keep track of how much time is left.















Countdown app iphone