If you have configured Localytics to send push messages for your app, our SDK automatically detects whether a device has push messaging enabled or disabled and attaches this as a dimension to every Event and Session record. This allows you to split and filter reports based on this field. Localytics identifies if a device has push enabled differently for Android and iOS:
-
On Android, it is determined based on whether Localytics receives a valid Registration ID - what we call push token - which is obtained when your app properly registers a valid device with Firebase Cloud Messaging (FCM). In Localytics, this is achieved by calling registerPush(). Therefore, if this method is not called in your code base, Localytics will perceive the device as having push messaging disabled. If this method is called and the device has push enabled, Localytics will report as push enabled. There are apps, for example, that use an internal system to send FCM messages instead of Localytics. The user would then be registered with FCM but since code to pass the Registration ID was not included in the integration, the SDK would count this user as push disabled.
-
On iOS, we also require that the app successfully register for push and upload the device token to Localytics. Additionally, the user must actively enable notification alerts for the app, which apply to both local and remote notifications.