Is it possible to schedule notification from background dart code?
For example, like using work_manager plugin from executeTask method as if I register service that runs every hour and schedule today notification base on current location.
I tried out but no luck.
Can anyone help me with that?
In order schedule notifications work you should add lines below. Solution is this: add these lines after </activity> in AndroidManifest.xml:
<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"></action>
</intent-filter>
</receiver>
<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />
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