Problem
Understanding the behavior of the Subscribed to Push and Unsubscribed to Push events in the MoEngage platform, particularly on Android version 13 and above, is crucial. There is confusion about how these events are captured and reported based on responses to push notification permissions.
info |
Information This confusion arises when an app is installed, and Android's notification permission dialog box appears on the first launch, prompting the permission to be granted or denied. |
Explanation
To clarify, let's examine the two possible actions after installing the app on Android 13 and above:
- User grants permission
- When push notification permissions are accepted, the app must immediately inform the MoEngage SDK to trigger the Subscribed to Push event.
- This signals the SDK of the user's consent to receive push notifications.
- User denies permission
- If permissions are denied, the MoEngage SDK will not trigger the Unsubscribed to Push event.
- On Android 13 and above, the default state is 'denied.' Because there is no change in state, the SDK does not record any event.
info |
Information For Android 12 and below, the permission state is 'granted' by default. Because users do not actively subscribe or unsubscribe, no related events will be generated. |