Fix isEqualToHandledNotification for CleverTap notifications.
If the app is launched from a CleverTap push notification, the consequent CleverTap notification opens will not work since isEqualToHandledNotification always returns true for CleverTap notifications - for notifications without notification Id (lp_occurrence_id key).
Default CleverTap openDeepLinksInForeground to true when called from notificationOpened, unless openDeepLinksInForeground is explicitly set. Fixes an issue on Unity when the application is opened from a notification and the app takes a while to load. At that point, the notification open in CleverTap is executed when the app is in the foreground.
Implementation
Check if notifications have a notification Id set - the id should not be equal to the default one returned by the method -1.
openDeepLinksInForeground is nil unless set explicitly. If not set, default to the notification event being Open or Receive. Use openDeepLinksInForeground: true if Opened.
Background
Fix
isEqualToHandledNotification
for CleverTap notifications. If the app is launched from a CleverTap push notification, the consequent CleverTap notification opens will not work sinceisEqualToHandledNotification
always returnstrue
for CleverTap notifications - for notifications without notification Id (lp_occurrence_id
key).Default CleverTap
openDeepLinksInForeground
totrue
when called fromnotificationOpened
, unlessopenDeepLinksInForeground
is explicitly set. Fixes an issue on Unity when the application is opened from a notification and the app takes a while to load. At that point, the notification open in CleverTap is executed when the app is in the foreground.Implementation
-1
.openDeepLinksInForeground
isnil
unless set explicitly. If not set, default to the notification event being Open or Receive. UseopenDeepLinksInForeground: true
ifOpened
.Testing steps
Is this change backwards-compatible?