Messages
From Pointui
This is a Global object. You must not create an instance of it as one is always available for your use.
Provides access to the message stores on the device such as emails and text messages. NOTE: this is a global object so an instance is always available to use – you do not need to ever create additional instances.
Methods
void GetStores(DataTable result)
Returns the entire lists of message stores in the result DataTable. Each store has a unique name.
void GetMessages(String storeName, String folderName, DataTable result)
Gets all messages for the requested store and makes them available in the result DataTable.
PARAMETERS
- storeName – name of the store to retrieve messages from – must be a valid store name that has been configured within Outlook on the device.
- folderName – name of the folder to get messages from which must be one of the following:
- “Inbox”
- “Sent Items”
- “Deleted”
- “Drafts”
- “Outbox”
- result – the DataTable to store the result.
The DataTable supports the following columns:
| columnName | Expected Data Type |
|---|---|
| EntryID | String |
| Subject | String |
| SenderEmailAddress | String |
| SenderName | String |
| MessageDeliveryTime | DateTime |
| MessageFlags | int |
| IsUnread | bool |
| DisplayName | String |
| Body | String |
| Body.Intro | String |
| Body.PlainText | String |
EXAMPLE
//get text messages from the Inbox folder DataTable tbl; Messages.GetMessages(“SMS”, "Inbox", tbl); //set which columns are needed tbl.SetColumns("EntryID,Subject,SenderName,IsUnread,MessageDeliveryTime"); //sort the messages tbl.SetSort("MessageDeliveryTime", "Descending"); //do not want all, just the most recent 20 tbl.SetMaxItems(20);
void Display(String messageID)
Displays the OS view of the message. Each message has a unique message ID and this can be retrieved by using GetValue() on the DataTable with the column name “EntryID”.
void DisplayInbox(String storeName)
Displays the native OS email application focused on the store specified.
void Compose()
void Compose(String storeName)
void Compose(String storeName, String toAddress)
Displays the native OS compose screen. If a storeName is provided then the new message will automatically be created under the supplied store. If a toAddress is provided then the new message will have pre-populated the To address field.
int GetUnreadCount(String storeName)
Returns the number of unread messages from the Inbox of the specified store.
void Synchronize(String storeName)
Begins synchronizing the account specified. There is no ability to get progress or status feedback.
void Delete(String entryID)
AVAILABLE SINCE: 2.0.18b Deletes the specified message.
