Check notification permissions
- 18 May 2022
- 1 Minute to read
-
DarkLight
-
PDF
Check notification permissions
- Updated on 18 May 2022
- 1 Minute to read
-
DarkLight
-
PDF
Checks if the user has enabled notification permissions for the current app.
If notifications can be received, the first output is triggered. On iOS, the Notification permissions object additionally includes information on if the user has enabled badges/alert banners/sounds for the notifications.
If the user has not given permission to receive notifications, or has revoked the permissions, the second output is triggered.
If an error occurred while checking the permissions the third output is triggered.
Input arguments
No input arguments.
Output arguments
Number of outputs: 3
Label | Key | Type | Description |
---|---|---|---|
Notification permissions | notificationPermissions
|
Object | Object describing what notification permissions have been granted for the current app. |
|
notificationPermissions.granted
|
Boolean | Has the user granted permission to the app to receive notifications? |
|
notificationPermissions.alertGranted
|
Boolean | iOS-only. Has the user allowed banner alerts to be shown for notifications? |
|
notificationPermissions.badgeGranted
|
Boolean | iOS-only. Has the user allowed notifications to display a badge next to the app icon? |
|
notificationPermissions.soundGranted
|
Boolean | iOS-only. Has the user allowed notifications to play a sound? |
Events
No events.
Errors
Label | Code | Description |
---|---|---|
unknown error | unknown |
Unknown error occurred while checking notification permissions |
Was this article helpful?