requestNotificationPermission
Requests notification permission for the application. On Android 13 (API 33) and above, this method initiates an intent to the system settings screen where the user can grant the notification permission.
Note: Ensure to add
Requests notification permission on the platform.
Parameters
Callback invoked when the permission is granted.
Callback invoked when the permission is denied.
Requests permission to display notifications.
Parameters
Callback executed if the permission is granted
Callback executed if the permission is denied
Requests notification permission from the user on iOS.
This function uses UNUserNotificationCenter
to request authorization for notifications with options for alerts, sounds, and badges.
Parameters
Callback to be executed if the user grants notification permissions.
Callback to be executed if the user denies notification permissions.
Required Configuration in Info.plist
: Add the following keys to your Info.plist
file to provide a clear description to the user when the app requests notification permissions:
<key>NSLocationWhenInUseUsageDescription</key>
<string>We need access to notifications to keep you updated about important events.</string>
If you are using remote notifications, make sure to enable the "Push Notifications" capability in your Xcode project.
Requests permission to display notifications.
Parameters
Callback executed if the permission is granted
Callback executed if the permission is denied