Flutter push notifications offline on backgroud - flutter

I am trying to make a new todo tasks app and its offline no intternet needed...
I want to get reminded when the tasks time is up
i tried using local notification it worked as showing notification but for my phone as the README section of the package said that it doesnt work for everybody's phone for such android things... So when i terminate my app or having it on my backgroud and wait for the schedule notification nothing appear...
So any idea of how i can let my app work on backgroud

for the solution i used workmanager so it run my app after a while in the background and push my local notification to the user
welp its hard to it for every 1 sec cause the work manager only make a loop and activate every 15 min..
workmanager is a flutter package you can use for free :3

Related

Flutter Fetch API in background when App is terminated

I'm want to fetch API every 15min and check if anything changes. Then if it does send push notification to inform the user about changes. Now my problem is that I cannot get to run the check on IOS. Does anyone have a solution for this?
There is a tool: https://pub.dev/packages/background_fetch, but it's not the perfect Dart solution for iOS to schedule background tasks as android when the app terminates, so try using Alarm Manager and
Flutter WorkManager
Also, you can try native side implementation with BGTaskScheduler

How to reschedule a notification starting from a specific date in Flutter Local Notifications?

I have recently been working on a new project which involves the package Flutter Local Notifications. Everything works smoothly except for one issue. My project involves a daily notification that alerts the user to open the app to check something off for that day. The issue is that when a user checks off the box prior to the time of the notification, the notification still shows up, which is not ideal for my project.
I am currently using zonedSchedule with
matchDateTimeComponents: DateTimeComponents.time
and trying rescheduling a notification after the user checks the box before the time the notification is supposed to show, however, this just schedules it for the same time again. I want to reschedule the notification and "ignore" or exclude the notification from that day and reschedule it for the next. I have already tried to use WorkManager to schedule the rescheduling of the notification after the time it is supposed to go off, but this is not working properly on all devices in the background. How should I go about accomplishing this task?
Thank you in advance for the help!

Flutter Awesome Notification

I am using flutter awesome notification.
Wish to send a notification when the app is closed (not running in background). Just like an Alarm Clock, the notification will be send at specific time. Not push from external services like firebase.
Is there a way for doing that? Or I need another package like android_alarm_manager?
I am not sure about awsome_notification but If you want to send a notification at some particular time of the day then you can use flutter_local_notification This package will send you a notification if your app is closed or running
You need to use Scheduled notifications
But if you want to open a screen like an alarm and clock app do you need to use android_alarm_manager or some other plugin.

Flutter: automatically resume app from background service

Is there a way to automatically resume a flutter app from a paused or inactive lifecycle state with a background service?
Similar to when the WhatsApp app received a call while it was paused or inactive.
No, you can not simply wake up the app from a service. This would open the door for all kinds of spam apps and security risks. You need to specifically register it as VOIP app using CallKit or something like SIP on Android to receive incoming calls.
For other things you can use push notifications but that won't start your app. The user always has to click on the notification that you display.
You need to use a couple of things together:
Use push notifications to wake up your app:
https://pub.dev/packages/firebase_messaging
To start your app using push notifications refers to this post:
https://stackoverflow.com/a/48405551/4335775
Use CallKit (IOS) or ConnectionServices (Android) to show the upcoming call screen. By the day of this answer there are only a few packages to handle these things, here is one that can handle both platforms:
https://pub.dev/packages/flutter_callkeep
If you want a completely different thing and need to run some background process, there are bunch whole of things you should know first. I suggest beginning here: https://flutter.dev/docs/development/packages-and-plugins/background-processes
Here is a usefull package to work with background processes that should be constantly running:
https://pub.dev/packages/background_fetch
The app can only be waked up with explicit commands. The user must hit the button. And there are ways to handle the input, messages may pass parameters, you can save the previous state in the database or shared preferences, etc.

iOS, Can I schedule a local notification and notice it in AppDelegate with the app running in background?

I'm using local and silent remote notifications in the app I'm working at work. I need to launch some methods according to events received from our servers or from the app itself via silent remote and local notifications respectively. I have no problem with remote notifications with the app in foreground, background or with the notification touched but I can't get the scheduled local notifications to be noticed by AppDelegate if the app is running in background (I mean, without user tapping the banner).
Is this even possible? If yes, which parameter should I add to the notification or what method is supposed to be called when it arrives?
I don't think it's possible to send a local notification that runs silently and starts your app. The normal way to do things like this is Background App Refresh:
https://developer.apple.com/documentation/uikit/app_and_environment/scenes/preparing_your_ui_to_run_in_the_background/updating_your_app_with_background_app_refresh
You have no control of the time. iOS will periodically give you short slices of time