KlaviyoRemoteMessage

Extension functions for RemoteMessage to provide convenient accessors to our data fields

Properties

Link copied to clipboard
val RemoteMessage.body: String?

Parse notification body text

Link copied to clipboard
val RemoteMessage.channel_description: String

Parse channel description or fallback on default

Link copied to clipboard
val RemoteMessage.channel_id: String

Parse channel ID or fallback on default

Link copied to clipboard
val RemoteMessage.channel_importance: Int

Parse channel importance or fallback on default

Link copied to clipboard
val RemoteMessage.channel_name: String

Parse channel name or fallback on default

Link copied to clipboard
val RemoteMessage.clickAction: String?

Parse click action (activity or intent filter) Click action could be explicitly sent, or we should use ACTION_VIEW if a deep link is sent

Link copied to clipboard
val RemoteMessage.deepLink: Uri?

Parse deep link into a Uri if present

Link copied to clipboard
val RemoteMessage.isKlaviyoMessage: Boolean

Determine if the message originated from Klaviyo from the tracking params

Link copied to clipboard
val RemoteMessage.isKlaviyoNotification: Boolean

Determine if the message is a notification from Klaviyo (as opposed to a silent push)

Link copied to clipboard
val RemoteMessage.notificationCount: Int

Parse out notification count from payload (for app badging)

Link copied to clipboard
val RemoteMessage.notificationPriority: Int

Parse out notification priority or fallback on default

Link copied to clipboard
val RemoteMessage.smallIcon: Int

Determine the resource ID of the small icon

Link copied to clipboard
val RemoteMessage.sound: Uri?

Parse Uri to sound resource

Link copied to clipboard
val RemoteMessage.title: String?

Parse notification title text