Contact

Airship contact. A contact is distinct from a channel and represents a "user" within Airship. Contacts may be named and have channels associated with it.

Properties

Link copied to clipboard
Link copied to clipboard

Contact conflict listener.

Link copied to clipboard

The current named user Id.

Link copied to clipboard
val namedUserIdFlow: StateFlow<String?>

Named user Id updates.

Functions

Link copied to clipboard
fun associateChannel(channelId: String, channelType: ChannelType)

Associates a channel to the contact.

Link copied to clipboard
fun disassociateChannel(contactChannel: ContactChannel, optOut: Boolean = true)

Disassociates the contact channel.

Link copied to clipboard

Edit the attributes associated with this Contact.

Link copied to clipboard

Edits the subscription lists associated with this Contact.

Link copied to clipboard

Edit the tags associated with this Contact.

Link copied to clipboard
Link copied to clipboard

Returns the current set of subscription lists for the current contact.

Link copied to clipboard

Returns the current set of subscription lists for the current contact.

Link copied to clipboard
fun identify(@Size(min = 1, max = 128) externalId: String)

Associates the contact with the given named user identifier.

Link copied to clipboard
Link copied to clipboard

Registers an Email channel.

Link copied to clipboard

Registers an Open channel.

Link copied to clipboard

Registers a Sms channel.

Link copied to clipboard
fun resendDoubleOptIn(contactChannel: ContactChannel)

Resends double-opt in for the given contact channel.

Link copied to clipboard
fun reset()

Disassociate the channel from its current contact, and create a new un-named contact.

Link copied to clipboard

Sets the SMS validation handler, to allow overriding of the default Airship validation.

Link copied to clipboard
suspend fun validateSms(msisdn: String, sender: String): Boolean

Validates an SMS number.