NotificationPayload

Helper accessor for notification data payload bundle as received from Twilio Notifications. Use in FirebaseMessagingService.onMessageReceived implementation to retrieve Twilio-generated payload fields safely.

Do not access the fields in the bundle directly - they could be modified without notice, always use this helper to access them.

Constructors

Link copied to clipboard
constructor(remoteMessage: Map<String, String>)
Create notification payload from the received map.

Types

Link copied to clipboard
enum Type
Represents payload type.

Properties

Link copied to clipboard
Value returned by getMessageIndex if notification contains no message index.

Functions

Link copied to clipboard
open fun getAuthor(): String
Get message author.
Link copied to clipboard
open fun getBody(): String
Get notification body.
Link copied to clipboard
Get notification conversation SID.
Link copied to clipboard
Get notification conversation title.
Link copied to clipboard
Get media content type.
Link copied to clipboard
open fun getMediaCount(): Long
Get number of media attachments.
Link copied to clipboard
Get media filename.
Link copied to clipboard
open fun getMediaSid(): String
Get media SID.
Link copied to clipboard
open fun getMediaSize(): Long
Get media size.
Link copied to clipboard
open fun getMessageIndex(): Long
Get message index.
Link copied to clipboard
open fun getMessageSid(): String
Get message SID.
Link copied to clipboard
open fun getSound(): String
Get notification sound.
Link copied to clipboard
Get notification type.