SmsTextMessage2 SmsTextMessage2 SmsTextMessage2 SmsTextMessage2 SmsTextMessage2 Class

Definition

Encapsulates a decoded SMS text message. Prefer this class to the older SmsTextMessage class.

Note

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.

To send a text message, construct an instance of this class, set all appropriate fields, and send using SmsDevice2.SendMessageAndGetResultAsync.

To access a received text message, create a background task that is triggered by the SmsMessageReceived event. In that task, first use SmsMessageReceivedTriggerDetails.MessageType to determine that the message is a text message, then use the SmsMessageReceivedTriggerDetails.TextMessage property to access the instance of this class.

public : sealed class SmsTextMessage2 : ISmsMessageBase, ISmsTextMessage2
struct winrt::Windows::Devices::Sms::SmsTextMessage2 : ISmsMessageBase, ISmsTextMessage2
public sealed class SmsTextMessage2 : ISmsMessageBase, ISmsTextMessage2
Public NotInheritable Class SmsTextMessage2 Implements ISmsMessageBase, ISmsTextMessage2
var smsTextMessage2 = new smsTextMessage2();
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
sms cellularMessaging

Constructors

SmsTextMessage2() SmsTextMessage2() SmsTextMessage2() SmsTextMessage2() SmsTextMessage2()

Constructs a new, default instance of this class.

Properties

Body Body Body Body Body

Gets or sets the body of the text message.

CallbackNumber CallbackNumber CallbackNumber CallbackNumber CallbackNumber

Gets or sets the callback number for the message.

CellularClass CellularClass CellularClass CellularClass CellularClass

Gets the cellular class of the message.

DeviceId DeviceId DeviceId DeviceId DeviceId

Gets the device identifier for the device associated with the SMS text message.

Encoding Encoding Encoding Encoding Encoding

Gets or sets the encoding scheme used for the message.

From From From From From

gets the phone number of the sender of the message.

IsDeliveryNotificationEnabled IsDeliveryNotificationEnabled IsDeliveryNotificationEnabled IsDeliveryNotificationEnabled IsDeliveryNotificationEnabled

Gets or sets whether text message delivery notification is enabled for this message.

MessageClass MessageClass MessageClass MessageClass MessageClass

Gets the message class of the message.

MessageType MessageType MessageType MessageType MessageType

Gets the message type of the message.

ProtocolId ProtocolId ProtocolId ProtocolId ProtocolId

Gets the protocol identifier for the message.

RetryAttemptCount RetryAttemptCount RetryAttemptCount RetryAttemptCount RetryAttemptCount

Gets or sets the number of retry attempts for the message.

SimIccId SimIccId SimIccId SimIccId SimIccId

Gets the ICCID (Integrated Circuit Card Identifier) of the SIM that received the message.

TeleserviceId TeleserviceId TeleserviceId TeleserviceId TeleserviceId

Gets the teleservice identifier associated with this message.

Timestamp Timestamp Timestamp Timestamp Timestamp

The timestamp of this message.

To To To To To

Gets or sets the recipient phone number for the message.

See Also