sendSMSMessage()method. This method takes a local number, which must be a
PhoneNumber, an E.164 formatted remote number and a message body.
PhoneMessageas described below.
sendMMSMessage()method. This is very similar to the method used for SMS but with an additional parameter
localUrl: URLfor the path to the MMS media file to be sent with the message.
PhoneMessage, described below.
PhoneMessageas described below:
getMessages()methods. Messages can be retrieved using either a message ID or the local and remote phone numbers.
getMessage()method with the message ID. This returns a
PhoneMessageobject as described above.
getMessages()method. A limit can be specified for paging, as well as a paging token.
getMessages()call is a
TelephonyListTokenas described below.
getMessages()method, a list token object is returned which includes a list of results and a paging token that can be used to retrieve the next set of results.
getConversation(localNumber: PhoneNumber, remoteNumber: String)method.
getConversationsmethod. A limit can be specified for paging, as well as a paging token.
PhoneMessageConversationtype contains a
latestPhoneMessageproperty which can be used to retrieve the local and remote phone numbers involved in the conversation, as well as to display a preview of the conversation contents.
downloadData()method, passing it a
MediaObjectwhich can be found in the
mediaproperty of an MMS message. This method returns the raw media data. Images (jpeg, png, gif) are currently the only supported message media type.
deleteMessage()method is used and requires the message ID.
subscribeToMessagesmethod. When new messages or message updates occur, the result handler or subscriber you provide will be called with the latest version of the message. On iOS this method returns a
SubscriptionTokenthat cancels the subscription when it's released. On Android a unique ID is passed in to identify the subscriber and can be passed in to the
unsubscribeFromPhoneMessages(id: String?)method on Android.