Messaging
From WebOS101
Contents |
Introduction
The Messaging app can be launched by your app to send messages. Messages are launched in compose view and not sent immediately. As with many services, you will use Application Manager to launch the messaging app and fill in parameters as needed.
Using the service
Parameters
| Attribute | Type | Description |
|---|---|---|
| attachment | string | Optional. The file path to a single attachment file (JPEG). |
| composeRecipients | string | Optional. An alternative to using the personID or contactPointId. An array of JSON objects. Each object must contain an "address" object, which specifies either the target phone number or the target IM address. If an IM address is used, then the object must also contain a "serviceName" specifying the IM addressee's service. Valid service names are "yahoo", "gmail", and "aol". |
| contactPointId | string | Optional. Contact entry ID for the contact method (e.g., mobile phone number, IM address). This applies only to the launched chat view. Note : You can optionally pass a contactPointId to set the selected transport when you launch the chat. |
| messageText | string | Optional. The contents of the message. |
| personId | string | Optional. Contact ID for the recipient. This applies only to the launched chat view. |
Example
this.controller.serviceRequest('palm://com.palm.applicationManager', {
method: 'launch',
parameters: {
id: 'com.palm.app.messaging',
params: {
composeRecipients: [{
address: "joe",
serviceName: "yahoo"
},
{
address: "4085555555"
}],
messageText: 'Text of the message.'
}
},
onSuccess: this.handleOKResponse,
onFailure: this.handleErrResponse
});