undetermined time period on periodical notifications

I’m using expo to trigger periodical notifications inside my app. What I want is that every one minute the app trigger a notification that query an endpoint on a backend to check for a certain condition.

The problem I’m having is that there is a undetermined time period that pass before the periodical notifications start working. Sometimes it’s a couple of hours, sometimes even more that an entire day, but once they start after the time period, they work.

I’m using Expo TaskManager indide my Main component componentDidMount method like this:

await TaskManager.isTaskRegisteredAsync(SET_ALERTS_TASK); await BackgroundFetch.registerTaskAsync(SET_ALERTS_TASK, {​​​​​​​minimumInterval: 60, stopOnTerminate: false}​​​​​​​) await BackgroundFetch.setMinimumIntervalAsync(60);

Could you tell us i’ve you’ve solved this issue?. Or what other ways you’ve seen of doing this kind of notifications(without push).

Hey @dblueh, can you share a publicly accessible and minimal repro of this that we can test on our end? Code snippets are helpful but being able to run the code on our end without additional configuration or steps is ideal.

Cheers,
Adam

Hi @adamjnav, been working with @dblueh on this app for a while and we notice that the app works like a charm on the expo app but then, when we install the apk on a real device dont work. The app works on certains android devices but on a undetermined time period, on iOS dont. Even if we change the code and just leave a periodically local notification without the request to the backend, dont work either. This is the code snippet:

Thanks,
Jorge

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.