Why Does the SDK Not Trigger the 'Unsubscribed To Push' Event?

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:

  1. 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.
  2. 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.

Was this article helpful?
0 out of 0 found this helpful

How can we improve this article?