hasNotificationPermission

Checks if the application has permission to post notifications.

On devices running Android 13 (API level 33) or higher, this method verifies whether the app has been granted the POST_NOTIFICATIONS permission. On lower versions, it returns true by default as this permission is not required.

Return

true if the notification permission is granted, or if the platform version is lower than API level 33.

Checks if the app has notification permission.

Return

true if the app has notification permission, false otherwise.

Checks if the application has permission to display notifications.

Return

true if the application has permission, false otherwise.

Checks if the app has permission to display notifications on iOS.

This function uses UNUserNotificationCenter to retrieve the current notification settings and determines if the authorization status is either authorized or provisional.

Note: This function actively waits for the asynchronous callback to complete, which may cause a block in the current thread. Use with caution in a production environment.

Return

true if notification permissions are granted or provisionally granted, false otherwise.

Checks if the application has permission to display notifications.

Return

true if the application has permission, false otherwise.