androidflutternotificationsandroid-permissionsawesome-notifications

Awesome Notifications - Different dialogs to request to permission from user in Android


Awesome Notifications package is nicely integrated into my app and sends notifications as it should.

However, I have an issue with the requestPermissionToSendNotifications under Android. In my app, when requesting permission from the user to be able to send notifications via

bool userNowAllowed = await AwesomeNotifications().requestPermissionToSendNotifications();

there is one of two different dialogs presented, see below. One is full screen, one is only a small dialog at the bottom.

I cannot figure out how it is currently decided by the app/Android which of the dialogs is presented each time?

How can I select which dialog should be used?

Essentially, I would like to use only the first, less intrusive one.

enter image description here

enter image description here


Solution

  • I found the following comment in the package's discord channel, which explains it:

    You are requesting permissions, and permissions can only be displayed at application once. After the user denies or revoke, the only alternative is to redirect the users to the notification settings page.