Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface IMessage

interface IMessage
Extends com.amazon.apmf.IStandard Message. Corresponds to a specific message handle. Message attributes are retrieved from the remote device message repository when a getter is invoked for the first time, which blocks until the message is retrieved.

Methods

setReadStatus()

void setReadStatus(bool read)
Set the read status of the message. This is a blocking call until the remote device message repository has updated the read status. Privilege: com.amazon.bluetooth.privilege.message_client

Parameters

read
bool — Required True for read, False for unread.

Throws


setDeletedStatus()

void setDeletedStatus(bool deleted)
Set the deleted status of the message. Messages whose deleted status is changed to deleted are moved to the “Deleted” folder. Messages whose deleted status is changed to undeleted are moved first to the “Inbox” folder. The message repository might move the message again back to its original folder before deletion. This is a blocking call until the remote device message repository has updated the deleted status. Privilege: com.amazon.bluetooth.privilege.message_client

Parameters

deleted
bool — Required True for deleted, false for undeleted.

Throws


getOriginator()

MessageContact* getOriginator()
Get message originator. The message originator is the original sender of the message. Privilege: com.amazon.bluetooth.privilege.message_client

Returns

MessageContact* Returns a pointer to MessageContact.

Throws


getRecipients()

MessageContact*[] getRecipients()
Get message recipients. Privilege: com.amazon.bluetooth.privilege.message_client

Returns

MessageContact*[] Returns an array of MessageContact.

Throws


isRead()

bool isRead()
Get message is read. Indicates whether the message is read or not. The initial status is read if the message has already been read on the remote device. Privilege: com.amazon.bluetooth.privilege.message_client

Returns

bool Returns true if read, false if unread.

Throws


getType()

MessageType getType()
Get message type. Privilege: com.amazon.bluetooth.privilege.message_client

Returns

MessageType Returns MessageType.

Throws


getFolder()

string getFolder()
Get message folder. The folder is where the message is located in the message repository. This also includes the path information. Privilege: com.amazon.bluetooth.privilege.message_client

Returns

string Returns the folder string

Throws


getCharset()

MessageCharset getCharset()
Get message character set. Indicates the character set used by the message contents. Only used if the message contains textual content. Privilege: com.amazon.bluetooth.privilege.message_client

Returns

MessageCharset Returns MessageCharset.

Throws


getEncoding()

MessageEncoding getEncoding()
Get message encoding. Indicates the encoding used by the message contents. Privilege: com.amazon.bluetooth.privilege.message_client

Returns

MessageEncoding Returns MessageEncoding.

Throws


getLanguage()

MessageLanguage getLanguage()
Get message language. Indicates the language of the message. Only used if the message contains textual content. Privilege: com.amazon.bluetooth.privilege.message_client

Returns

MessageLanguage Returns MessageLanguage.

Throws


getContent()

u8[] getContent()
Get message contents. Privilege: com.amazon.bluetooth.privilege.message_client

Returns

u8[] Returns message contents as array of bytes.

Throws


Last modified on October 29, 2026