rafaelsetragni / awesome_notifications

A complete solution to create Local Notifications and Push Notifications, throught Firebase or another services, using Flutter.
https://discord.awesome-notifications.carda.me
Apache License 2.0
749 stars 324 forks source link

Notifications are not displayed after an android reboot #958

Closed rattlesnake2028 closed 2 weeks ago

rattlesnake2028 commented 2 months ago

Rules

1 - Describe the bug

I'm in the process of creating a reminder application. It works as expected (notifications are displayed) as long as the application is running. If I restart my android smartphone, then the reminders already created are no longer displayed as notifications.

2 - Provide us as much information as possible

I'm working on a flutterFlow project

I asked the permissions via :

await AwesomeNotifications().requestPermissionToSendNotifications();

And I also disabled battery optimisation on the phone.

I've noticed that after a reboot, notifications are still seen as existing by awesome_notifications. However, they are no longer displayed when the time comes.

3 - How To Reproduce the Error

Build a flutterflow Project with awesome_notifications, launch a reminder and then reboot the phone.

4 - Expected behavior

After a reboot, scheduled reminders should appears

5 - Screenshots

No screenshots to provide

6 - Additional context

I tried on a onePus and Honor and asus smartPhones

rattlesnake2028 commented 2 months ago

I just see this thread : https://github.com/rafaelsetragni/awesome_notifications/issues/806

But adding this code in the manifest :

        <receiver android:name="me.carda.awesome_notifications.core.broadcasters.receivers.ScheduledNotificationReceiver" android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED"/>
                <action android:name="android.intent.action.QUICKBOOT_POWERON" />
            </intent-filter>
        </receiver>

Didn't resolve anything.

In order for phone reboot to work, do I have to change the manifest other than add this permission :

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
github-actions[bot] commented 3 weeks ago

This issue was automatically closed due inactivity, but can be reopened at any time.