MessagingAppService

interface MessagingAppService

Service responsible for maintaining all state and business logic for the messaging frontend. Note that this means that its API is tightly couple with StockMessagingFrontend.

The basic concept is that a MessageStackNotifcation in this service is one-to-one reflected by a MessageStackNotificationPanel on the frontend. All immediate state of the panel is directly described by the MessageStackNotifcation, without any logic being needed inside the frontend.

Types

Link copied to clipboard
enum CallState : Enum<MessagingAppService.CallState>

The state of calling.

Link copied to clipboard
object Companion
Link copied to clipboard
data class MessageStackNotification(    val id: MessagingAppService.MessageStackNotificationId,     val senderDisplayName: StringResolver,     val image: DrawableResolver?,     val applicationDisplayName: StringResolver,     val unreadMessagesCount: Int,     val quickReplyMessages: List<String>,     val playbackState: MessagingAppService.PlaybackState,     val replyInfo: MessagingAppService.ReplyInfo,     val callState: MessagingAppService.CallState) : Parcelable

The message stack notification.

Link copied to clipboard
data class MessageStackNotificationId(val value: Long) : Parcelable

A globally and temporally unique ID for a message stack notification.

Link copied to clipboard
enum PlaybackState : Enum<MessagingAppService.PlaybackState>

The playback state of the message stack notification.

Link copied to clipboard
data class ReplyInfo(val replyMessage: String? = null, val replyState: MessagingAppService.ReplyInfo.ReplyState) : Parcelable

The information relating to a quick reply, which includes the reply message and the reply state.

Properties

Link copied to clipboard

All current message stack notifications.

Functions

Link copied to clipboard
abstract suspend fun onCallContact(id: MessagingAppService.MessageStackNotificationId)

Initiate a call to the sender of the message stack notification with the specified id.

Link copied to clipboard
abstract suspend fun onNotificationDismissed(id: MessagingAppService.MessageStackNotificationId)

Indicates that the message notification with the specified id was dismissed.

Link copied to clipboard
abstract suspend fun onNotificationPresented(id: MessagingAppService.MessageStackNotificationId)

Indicates that the message notification with the specified id is presented.

Link copied to clipboard
abstract suspend fun onQuickReply(id: MessagingAppService.MessageStackNotificationId, contentText: String)

Initiate a quick reply with the specified contentText to the sender of the message stack notification with the specified id.

Link copied to clipboard
abstract suspend fun onStartPlayback(id: MessagingAppService.MessageStackNotificationId)

Start playback for message stack notification with the specified id.

Link copied to clipboard
abstract suspend fun onStopPlayback(id: MessagingAppService.MessageStackNotificationId)

Stop playback for message stack notification with the specified id.