Reputation: 1
I'm developing a Flutter application for both Android and iOS where I need to check server reports every 24 hours and notify the user with a local notification if new reports are available. This process should occur even if the application has been terminated/killed by the user or the system.
Here's what I've looked into and tried so far:
Background Fetch: I've considered using the background_fetch
Flutter package to implement periodic tasks that would allow my application to wake up and perform the API call. However, I understand that on iOS, the exact timing of background fetches can't be guaranteed, and they won't occur at all if the application has been manually terminated by the user.
Local Notifications: For notifying the user, I plan to use the flutter_local_notifications
package to schedule notifications. Yet, my main issue remains triggering this notification based on the API's response when the app might not even be running.
WorkManager Package: I also looked into the workmanager
package, but found that it has similar limitations on iOS, as it relies heavily on the operating system's background execution policies, which do not guarantee execution at exact times or if the app is terminated.
Upvotes: 0
Views: 110