Accessing messages and using messaging services

The Messaging Service API allows Flash Lite applications to send, retrieve, and manage messages using the Messaging Center of a device. You can use the Messaging Service to create Flash Lite applications that:

  • Send SMS and MMS messages

  • Retrieve messages stored on the device

  • Notify the user when new messages arrive

  • Change the status of a message

  • Delete messages

Accessing the API and supported methods

To create a service object for the Messaging Service API, use Service.Messaging to identify the service provider and IMessaging to identify the supported interface:

var messaging = new Service("Service.Messaging", "IMessaging");

The IMessaging interface provides the following methods:

  • GetList()

    Use the GetList() method to retrieve messages stored in the Messaging Center of a device.

  • Send()

    Use the Send() method to send an SMS or MMS message.

  • RegisterNotification()

    Use the RegisterNotification() method to receive notifications of new incoming messages.

  • CancelNotification()

    Use the CancelNotification() method to cancel notification of new incoming messages.

  • ChangeStatus()

    Use the ChangeStatus() method to change the read status of a message.

  • Delete()

    Use the Delete() method to delete a message.

  • Cancel()

    Use the Cancel() method to cancel an ongoing asynchronous call. This method is valid for any asynchronous call made through the Messaging Service API.