CarMessage.Builder


class CarMessage.Builder


A builder for CarMessage

Summary

Public constructors

Public functions

CarMessage

Returns a new CarMessage instance defined by this builder

CarMessage.Builder
setBody(body: CarText?)

Sets a CarText representing the message body

CarMessage.Builder
setMultimediaMimeType(multimediaMimeType: String?)

Sets a String representing the MIME type of a multimedia message

CarMessage.Builder
setMultimediaUri(multimediaUri: Uri?)

Sets a Uri pointing to the contents of a multimedia message.

CarMessage.Builder
setRead(isRead: Boolean)

Sets a boolean, indicating whether the message has been read

CarMessage.Builder
setReceivedTimeEpochMillis(receivedTimeEpochMillis: Long)

Sets a long representing the message timestamp (in epoch millis)

CarMessage.Builder
setSender(sender: Person?)

Sets a Person representing the message sender

Public constructors

Builder

Added in 1.3.0
Builder()

Public functions

build

Added in 1.3.0
fun build(): CarMessage

Returns a new CarMessage instance defined by this builder

setBody

Added in 1.3.0
fun setBody(body: CarText?): CarMessage.Builder

Sets a CarText representing the message body

Messages must have one or both of the following:

  • A message body (text)
  • A MIME type + URI (image, audio, etc.)

setMultimediaMimeType

Added in 1.4.0
fun setMultimediaMimeType(multimediaMimeType: String?): CarMessage.Builder

Sets a String representing the MIME type of a multimedia message

Messages must have one or both of the following:

  • A message body (text)
  • A MIME type + URI (image, audio, etc.)

setMultimediaUri

Added in 1.4.0
fun setMultimediaUri(multimediaUri: Uri?): CarMessage.Builder

Sets a Uri pointing to the contents of a multimedia message.

Messages must have one or both of the following:

  • A message body (text)
  • A MIME type + URI (image, audio, etc.)

setRead

Added in 1.3.0
fun setRead(isRead: Boolean): CarMessage.Builder

Sets a boolean, indicating whether the message has been read

setReceivedTimeEpochMillis

Added in 1.3.0
fun setReceivedTimeEpochMillis(receivedTimeEpochMillis: Long): CarMessage.Builder

Sets a long representing the message timestamp (in epoch millis)

setSender

Added in 1.3.0
fun setSender(sender: Person?): CarMessage.Builder

Sets a Person representing the message sender

The Person must specify a non-null setName and setKey.