Thanks. I will let you know if I figure it out. I know it would be easier without expo, but itâs just the last piece I need. Gonna try to do lots of guess and check haha
One issue, which I discovered after going through a ton of githubs and everything is that you need to use a physical device. Apparently it doesnât work in the emulator. Honestly documentation is wack for background fetch. Itâs newer so maybe thatâs why. Never would have figured that out. I am getting a console.log for your last console.log though now at least. Think the other one not yet just because havenât tried triggering it. Bedtime for me but I think thatâs really the issue, will look at again tomorrow
Gotcha makes sense. But unfortunately the minimumInterval doesnât seem to do anything, doesnât repeat. Get the warning once and never again. Would think you should get it every second.
I implemented a timer in my project that essentially ârunsâ in the background. Depending on what you need it to do this could work if you just need to create a generic timer. I have an interval running Iâm the foreground using state that keeps track of the time. Using AppState I captured the time when the app is backgrounded. When the app is foregrounded I capture the date again and compare it to the old date and subtract the difference thus giving it the impression it is running in the background. As for notifications I schedule a notification for the timer start time when the timer is started. If the timer is paused I cancel the notification and when it is resumed I reschedule the notification for the new time. This provides the functionality of a timer without needed to use any background logic. Hope this helps anyone with the same issue!