Push Subscription States
Push subscription states are filters that allow your users to control whether they receive messages or not. For your user to receive your messages through push, they must be
Opted-In, as well as Push Enabled.
|Opted-In||A user has explicitly allowed Braze will automatically move a user’s opt-in state to “Opted-In”.|
|Unsubscribed||A user has explicitly disallowed push notifications.|
Braze determines these states with push tokens, which can grant permission to send push notifications to your user - this is called “Push Enabled”.
Individual user profiles can be exported in the JSON format using the users/export/ endpoints using Braze’s Rest API. Braze will return a push tokens object, that contains push enablement information per device, as well as an additional
notifications_enabled parameter that will signify if a user blocked notifications from displaying (the previous Android SDK version does not have the
Occasionally, a push message will bounce (not be received by a user). This can happen because a user has either uninstalled the app, or because iOS or Android has changed the push token, as they have a right to do.
A user is “Push Enabled” or “Push Registered” if they have an active push token for an app in your app group.
On the User Engagement tab in the dashboard you will see: Push Registered For followed by an App Name(s) or followed by No Apps. There will be an entry for every device that belongs to the user.
If the device entry’s app name is prefixed by
Foreground:, the app is authorized to receive both foreground push notifications (visible to the user) and background push notifications (not visible to the user) on that device.
On the other hand, if the device entry’s app name is prefixed by
Background:, the app is only authorized to receive background push and can not display user-visible notifications on that device. This usually indicates the user has disabled notifications for the app on that device.
If a push token is moved a different user on the same device, that first user will no longer be push registered.
iOS & Android Details
Your users must explicitly opt-in to receive your push messages. You must request whether the user would like to receive push from you.
If your user allows push, you will receive a token and be able to send remote notifications to that user that appear in the foreground. If your user does not allow push notifications, you will still receive a token, but this token will only be able to send silent push which permits the app to carry out actions in the background (you must have “Remote Notifications” enabled in Xcode).
iOS users are considered “Push Enabled” only if they have allowed notifications in the foreground.
You do not need to request permission to send push notifications to Android users. As the user has not explicitly requested to receive push, Braze will not automatically update the user’s opt-in state. Upon a user’s first session on Android, Braze will automatically request for a new token and upon successfully receiving update the user’s push enabled state.
If the user disables push, Braze will mark them as foreground push disabled no longer attempt to send them push messages. The filter
Push Enabled will result in
false for this user. You may continue to send background (silent) push notifications with the segmenting filter
Background Push Enabled = true.
On Android, Braze will move a user to be push disabled if:
- A user uninstalls the app from their device.
- Braze receives a bounce when sending to a specific token (sometimes caused by app updates, uninstalls, new push token version or format).
- Push registration fails to GCM/Firebase (sometimes caused by poor network connections or a failure to connect to or on GCM to return a valid token).
- (For Android SDK v2.2.2+) The user blocks push notifications for the app within their device settings and subsequently log a session.
Before Android SDK v2.2.2
Here are some details you should know if you aren’t using our most up to date Android SDK.
- The previous version of the Android SDK does not detect that a user has disabled push and so the user’s push enabled state remains enabled. When you attempt to send to a device in this state the push is ‘sent’ and the device receives the payload but is suppressed by the device so is not displayed to a user. Braze refers to this as ‘silently failing’.
- The previous version of the Android SDK does not have the
notifications_enabledparameter and will not return a value for it if user data is called using the Braze REST API.