I 've tried background_fetch: '^0.1.0'
and alarm_manager package, but when the app is closed, it removed from the recent apps, and it does not work. I need to hit API every 15 min n show Notification if data is there
when App is closed any solution without writing Native code. I don't know iOS development, I know Android I don't need Firebase Push Notification
A plugin to keep flutter apps running in the background. Currently only works with Android. It achieves this functionality by running an Android foreground service in combination with a partial wake lock and disabling battery optimizations in order to keep the flutter isolate running.
It offers a bunch of features like for example scheduling when notifications should appear, periodically show a notification (interval-based), handle when a user has tapped on a notification when the app is in the foreground, background, or terminated, specify a custom notification sound and much more.
Background fetch is not controllable on iOS by the app developer. It is controlled by the OS. You sign up for "Background App refresh".
Once your app has registered for Background App refresh. The OS will awaken your app periodically at it's discretion to let you do some work. Then your app is put right back into sleep again. Depending on how long it's been scene the user opened your app it may have been purged from ram. If you are purged from ram it's very likely you won't be awakened again until the user opens your app or is plugged into power and charging the phone.
From https://pub.dev/packages/background_fetch
iOS can take some hours or even days to start a consistently scheduling background-fetch events since iOS schedules fetch events based upon the user's patterns of activity.
iOS favors Push notifications to save battery life. All push notifications run though apples APN service.
https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server This saves on battery life as only one constant connection has to remain open on the device to Apple. Instead of multiple connections from many servers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With