handle Notification Open
Tells Superwall the user opened a notification, so it can measure the notifications it sends.
Call this with the intent that launched your activity from a notification tap, for example from onCreate and onNewIntent. Notifications that Superwall didn't send are ignored, so you can pass every intent in.
This works as is for notifications FCM displays itself, whose tap intent carries the notification's data keys as extras. If your app builds the notification itself in onMessageReceived, copy the sw data value into the extras of the tap PendingIntent's intent:
val intent = Intent(this, MainActivity::class.java)
.putExtra("sw", message.data["sw"])Parameters
The intent whose extras carry the notification's data.
Tells Superwall the user opened a notification, so it can measure the notifications it sends.
Use this when you have the data map of a notification the user tapped. Call it only for a tap: never from onMessageReceived when a message is delivered, which would count every delivery as an open. Notifications that Superwall didn't send are ignored, so you can pass every tapped one in.
Parameters
The notification's FCM data.