Check notification permissions

Checks if the user has enabled notification permissions for the current app.

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.

Input arguments

No input arguments.

Output arguments

Number of outputs: 2

Label

Key

Type

Description

Notification permissions

notificationPermissions

Object

Object describing what notification permissions have been granted for the current app.

  • Granted?

notificationPermissions.granted

Boolean

Has the user granted permission to the app to receive notifications?

  • Alert permissions granted?

notificationPermissions.alertGranted

Boolean

iOS-only. Has the user allowed banner alerts to be shown for notifications?

  • Badge permissions granted?

notificationPermissions.badgeGranted

Boolean

iOS-only. Has the user allowed notifications to display a badge next to the app icon?

  • Sound permissions granted?

notificationPermissions.soundGranted

Boolean

iOS-only. Has the user allowed notifications to play a sound?

Events

No events.

Errors

No errors.