Package com.tomtom.ivi.platform.messaging.api.common.model

This library contains data representation of messaging information. It can be used for implementing a custom messaging service, or in a frontend that uses the messaging service.

The ConversationCache and ConversationContact classes define the data belonging to a Conversation. The MessageType class defines the data belonging to a Message. MessagingProviderHelper is a helper class for implementing a messaging provider.

Types

Link copied to clipboard
data class BluetoothDeviceConversationSource(val address: BluetoothDeviceAddress) : ConversationSource

A conversation source that is used when a conversation originates from a paired Bluetooth device.

Link copied to clipboard
data class Conversation(    val id: Uid<Conversation>,     val contacts: Set<ConversationContact>,     val capabilities: EnumSet<ConversationCapability>,     val applicationDisplayName: StringResolver,     val messageType: MessageType,     val unreadMessages: List<Uid<Message>>,     val source: ConversationSource? = null) : Parcelable

Represents a conversation between the user and one or more contacts.

Link copied to clipboard
enum ConversationCapability : Enum<ConversationCapability> , Parcelable

All capabilities that a Conversation can have.

Link copied to clipboard
data class ConversationContact(    val displayName: String?,     val phoneNumber: String?,     val contactIdForAvatarRetrieval: ContactId?,     val source: ConversationSource? = null) : Parcelable

The contact information for remote parties on a specific messaging application.

Link copied to clipboard
sealed class ConversationReply : Parcelable

Represents a reply to a conversation identified by an id. A reply can be a ConversationTextReply which has a textual content.

Link copied to clipboard
abstract class ConversationSource : Parcelable

Base type used to represent a source from which a conversation originates.

Link copied to clipboard
data class Message(    val id: Uid<Message>,     val conversationId: Uid<Conversation>,     val author: ConversationContact?,     val state: MessageState,     val contentText: String,     val timestamp: Instant) : Parcelable
Link copied to clipboard
enum MessageState : Enum<MessageState>
Link copied to clipboard
data class MessageType(val typeId: String) : Parcelable

The messaging type. Every messaging provider can handle one or more MessageTypes. However, a MessageType is always handled by only one messaging provider.

Link copied to clipboard
class MessagingProviderHelper

Helper class that provides all common functionality that is needed by messaging providers.

Link copied to clipboard
typealias SendMessageCallback = (conversation: Conversation, message: Message) -> Boolean