ISmsTextMessage ISmsTextMessage ISmsTextMessage ISmsTextMessage ISmsTextMessage Interface


This interface manipulates a decoded SMS text message. It provides direct access to the plain text body of the message, as well as key header properties, such as time stamp.


This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps.


Note that this class and its methods are supported for the maintenance of legacy desktop apps that used it in earlier versions of Windows; and if you do use this class, you must specify the Windows.Devices.Sms.LegacySmsApiContract in your app's manifest. Do not use this class if you are developing new apps for Windows 10. Instead, use the members of this namespace that do not require the Windows.Devices.Sms.LegacySmsApiContract.

public : interface ISmsTextMessage : ISmsMessage
struct winrt::Windows::Devices::Sms::ISmsTextMessage : ISmsMessage
public interface ISmsTextMessage : ISmsMessage
Public Interface ISmsTextMessage Implements ISmsMessage
// You can't instantiate an interface directly in JavaScript. You can use objects that implement the interface, however.

Windows 10 requirements

Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.Sms.LegacySmsApiContract (introduced v1)
sms cellularMessaging


Interface inheritance

ISmsTextMessage inherits ISmsMessage. Types that implement ISmsTextMessage also implement the interface members of ISmsMessage.


Body Body Body Body Body

Specifies the plain text body of the message.

Encoding Encoding Encoding Encoding Encoding

Specifies the encoding type that has been set to use when sending this message.

From From From From From

Specifies the phone number of the sender of the message.

Id Id Id Id Id

Retrieves an ID for the message, which can later be specified in calling message store methods in order to get or delete the message.

(Inherited from ISmsMessage)
MessageClass MessageClass MessageClass MessageClass MessageClass

Returns the message class, as determined by the operator's message network. The two most common classes are None (normal message) or Class0 (special operator message, such as a roaming warning that must be shown immediately to the user). A typical client for end-user messages ignores Class0 messages.

(Inherited from ISmsMessage)
PartCount PartCount PartCount PartCount PartCount

Retrieves the total number of parts in the original message if the message is part of a multi-part message.

PartNumber PartNumber PartNumber PartNumber PartNumber

Retrieves the part number of a multi-part message if this message is part of a multi-part message. It can be used to reconstruct the original message by joining the parts together, in conjunction with the PartReferenceId and PartCount properties.

PartReferenceId PartReferenceId PartReferenceId PartReferenceId PartReferenceId

Indicates a reference value that can be used if the message is part of a multi-part message. If this message belongs to a multi-part message, the PartNumber value can be used to reconstruct the full original message, and each part of that message will have the same value for PartReferenceId.

Timestamp Timestamp Timestamp Timestamp Timestamp

Retrieves the timestamp of the message. It is determined locally for a constructed message instance or from the service center timestamp of a received message.

To To To To To

Specifies the recipient phone number of this message.


ToBinaryMessages(SmsDataFormat) ToBinaryMessages(SmsDataFormat) ToBinaryMessages(SmsDataFormat) ToBinaryMessages(SmsDataFormat) ToBinaryMessages(SmsDataFormat)

Reads a message in the specified format and places the results in a new instance of a binary message.

See also