Windows.Devices.Sms Namespace

Provides the ability to send and receive Short Message Service (SMS) messages, filter incoming messages, and send messages silently, as well as to query properties about a Mobile Broadband SMS Device. Use this API to implement Mobile Operator (MO) applications that use app-directed SMS to implement MO features such as visual voice mail apps.

This is not the recommended API if you are developing an alternative to the built-in messaging app. Instead, you should use the Windows.AppModel.Chat API for developing messaging apps. The Chat API maintains a common data store for messages so that all of the apps that use the Chat API show a consistent view of messages. Windows.Devices.Sms offers no such data store, and in fact using it can interfere with SMS messages being delivered to apps that use the Chat API.

Note that this functionality is available only 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.

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

Classes

DeleteSmsMessageOperation

Enables start, track, and end an asynchronous message delete operation for a single message.

Note

This functionality is available only 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.

Note

This class and its methods are supported for the maintenance of legacy desktop apps that used it in earlier versions of Windows. If you do use this class, then you must specify the Windows.Devices.Sms.LegacySmsApiContract in your app's manifest. Don't use this class if you're developing a new app for Windows. Instead, use the APIs in this namespace that don't require the Windows.Devices.Sms.LegacySmsApiContract.

DeleteSmsMessagesOperation

Enables start, track, and end asynchronous SMS message delete operations for multiple messages.

Note

This functionality is available only 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.

Note

This class and its methods are supported for the maintenance of legacy desktop apps that used it in earlier versions of Windows. If you do use this class, then you must specify the Windows.Devices.Sms.LegacySmsApiContract in your app's manifest. Don't use this class if you're developing a new app for Windows. Instead, use the APIs in this namespace that don't require the Windows.Devices.Sms.LegacySmsApiContract.

GetSmsDeviceOperation

Retrieves an SmsDevice object asynchronously.

Note

This functionality is available only 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.

Note

This class and its methods are supported for the maintenance of legacy desktop apps that used it in earlier versions of Windows. If you do use this class, then you must specify the Windows.Devices.Sms.LegacySmsApiContract in your app's manifest. Don't use this class if you're developing a new app for Windows. Instead, use the APIs in this namespace that don't require the Windows.Devices.Sms.LegacySmsApiContract.

GetSmsMessageOperation

Supports the retrieval of a message from the SMS message store.

Note

This functionality is available only 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.

Note

This class and its methods are supported for the maintenance of legacy desktop apps that used it in earlier versions of Windows. If you do use this class, then you must specify the Windows.Devices.Sms.LegacySmsApiContract in your app's manifest. Don't use this class if you're developing a new app for Windows. Instead, use the APIs in this namespace that don't require the Windows.Devices.Sms.LegacySmsApiContract.

GetSmsMessagesOperation

Supports the retrieval of messages.

Note

This functionality is available only 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.

Note

This class and its methods are supported for the maintenance of legacy desktop apps that used it in earlier versions of Windows. If you do use this class, then you must specify the Windows.Devices.Sms.LegacySmsApiContract in your app's manifest. Don't use this class if you're developing a new app for Windows. Instead, use the APIs in this namespace that don't require the Windows.Devices.Sms.LegacySmsApiContract.

SendSmsMessageOperation

Enables the sending of a message.

Note

This functionality is available only 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.

Note

This class and its methods are supported for the maintenance of legacy desktop apps that used it in earlier versions of Windows. If you do use this class, then you must specify the Windows.Devices.Sms.LegacySmsApiContract in your app's manifest. Don't use this class if you're developing a new app for Windows. Instead, use the APIs in this namespace that don't require the Windows.Devices.Sms.LegacySmsApiContract.

SmsAppMessage

The interface for manipulating an SMS Application message. Application messages are those which cannot be characterized as any other message type.

Note

This functionality is available only 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.

SmsBinaryMessage

Represents an SMS message in raw PDU format. The data format differs depending on whether the message format (indicated by the value of the Format property) is GSM or CDMA.

Note

This functionality is available only 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.

Note

This class and its methods are supported for the maintenance of legacy desktop apps that used it in earlier versions of Windows. If you do use this class, then you must specify the Windows.Devices.Sms.LegacySmsApiContract in your app's manifest. Don't use this class if you're developing a new app for Windows. Instead, use the APIs in this namespace that don't require the Windows.Devices.Sms.LegacySmsApiContract.

SmsBroadcastMessage

Represents a broadcast SMS message.

Note

This functionality is available only 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.

SmsDevice

Supports the operation of a mobile broadband SMS device.

Note

This functionality is available only 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.

Note

This class and its methods are supported for the maintenance of legacy desktop apps that used it in earlier versions of Windows. If you do use this class, then you must specify the Windows.Devices.Sms.LegacySmsApiContract in your app's manifest. Don't use this class if you're developing a new app for Windows. Instead, use the APIs in this namespace that don't require the Windows.Devices.Sms.LegacySmsApiContract.

SmsDevice2

Extends the SmsDevice class, and supports the operation of a mobile broadband SMS device.

Note

This functionality is available only 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.

SmsDeviceMessageStore

Provides access to the messages stored on an SMS Device and information about the message store.

Note

This functionality is available only 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.

Note

This class and its methods are supported for the maintenance of legacy desktop apps that used it in earlier versions of Windows. If you do use this class, then you must specify the Windows.Devices.Sms.LegacySmsApiContract in your app's manifest. Don't use this class if you're developing a new app for Windows. Instead, use the APIs in this namespace that don't require the Windows.Devices.Sms.LegacySmsApiContract.

SmsFilterRule

Describes an SMS filtering rule.

Note

This functionality is available only 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.

SmsFilterRules

A collection of SmsFilterRule instances.

Note

This functionality is available only 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.

SmsMessageReceivedEventArgs

Provides data for ISmsBinaryMessage event handlers.

Note

This functionality is available only 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.

Note

This class and its methods are supported for the maintenance of legacy desktop apps that used it in earlier versions of Windows. If you do use this class, then you must specify the Windows.Devices.Sms.LegacySmsApiContract in your app's manifest. Don't use this class if you're developing a new app for Windows. Instead, use the APIs in this namespace that don't require the Windows.Devices.Sms.LegacySmsApiContract.

SmsMessageReceivedTriggerDetails

Contains event details for the event raised when an SMS message is received.

Note

This functionality is available only 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.

SmsMessageRegistration

Class used to represent registered message filters.

Note

This functionality is available only 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.

SmsReceivedEventDetails

Presents the details of SMS message events to the background work item that handles messages while your app is suspended.

Note

This functionality is available only 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.

Note

This class and its methods are supported for the maintenance of legacy desktop apps that used it in earlier versions of Windows. If you do use this class, then you must specify the Windows.Devices.Sms.LegacySmsApiContract in your app's manifest. Don't use this class if you're developing a new app for Windows. Instead, use the APIs in this namespace that don't require the Windows.Devices.Sms.LegacySmsApiContract.

SmsSendMessageResult

Encapsulates the results of calling SmsDevice2.SendMessageAndGetResultAsync.

Note

This functionality is available only 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.

SmsStatusMessage

Encapsulates an SMS status message.

Note

This functionality is available only 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.

To access a received status 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 status message, then use the SmsMessageReceivedTriggerDetails.StatusMessage property to access the instance of this class.

SmsTextMessage

Manages a decoded SMS text message, providing direct access to the plain text body of the message, as well as key header properties, such as time stamp.

Note

This functionality is available only 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.

Note

This class and its methods are supported for the maintenance of legacy desktop apps that used it in earlier versions of Windows. If you do use this class, then you must specify the Windows.Devices.Sms.LegacySmsApiContract in your app's manifest. Don't use this class if you're developing a new app for Windows. Instead, use the APIs in this namespace that don't require the Windows.Devices.Sms.LegacySmsApiContract.

SmsTextMessage2

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

Note

This functionality is available only 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.

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.

SmsVoicemailMessage

Encapsulates an SMS voicemail message.

Note

This functionality is available only 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.

SmsWapMessage

Represents an SMS WAP push message.

Note

This functionality is available only 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.

Structs

SmsEncodedLength

This structure represents information about the length of an SmsTextMessage object when it is encoded as a PDU.

Note

This functionality is available only 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.

Interfaces

ISmsBinaryMessage

This interface provides access to the raw binary format of an SMS message. The message is stored in the industry standard protocol description unit (PDU) format (see the SMS specification GSM 03.40).

Note

This functionality is available only 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.

ISmsDevice

This interface controls a mobile broadband SMS device. It is the primary entry point to SMS services on the device.

Note

This functionality is available only 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.

ISmsMessage

This interface is implemented by all types of SMS messages that are supported.

Note

This functionality is available only 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.

ISmsMessageBase

This interface specifies base functionality for all SMS message types.

Note

This functionality is available only 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.

ISmsTextMessage

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.

Note

This functionality is available only 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.

Note

This class and its methods are supported for the maintenance of legacy desktop apps that used it in earlier versions of Windows. If you do use this class, then you must specify the Windows.Devices.Sms.LegacySmsApiContract in your app's manifest. Don't use this class if you're developing a new app for Windows. Instead, use the APIs in this namespace that don't require the Windows.Devices.Sms.LegacySmsApiContract.

Enums

CellularClass

This enumerated type defines the type of radio standard in a device.

Note

This functionality is available only 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.

SmsBroadcastType

Values that describe the type of a broadcast (emergency alert) message.

Note

This functionality is available only 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.

SmsDataFormat

This enumerated type identifies the format of a given protocol description unit (PDU) buffer.

Note

This functionality is available only 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.

SmsDeviceStatus

Contains values that indicate the readiness of an SMS device to engage in cellular network traffic operations.

Note

This functionality is available only 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.

SmsEncoding

This enumerated type is used to determine the encoding algorithm to send or calculate the length of an SmsTextMessage object.

Note

This functionality is available only 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.

SmsFilterActionType

Values that describe the action to be taken on a message filter.

Messaging apps use SMS filters when they use SMS to communicate app-specific data that is not necessarily intended to be displayed to the user. Note that filters are processed in a fixed order, by filter action type. All AcceptImmediately filters are processed first, then all Drop filters, and so on.

Note

This functionality is available only 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.

SmsGeographicalScope

Values that describe the geographical scope of a cell broadcast message.

SmsMessageClass

This enumerated type specifies the message class of a message. The message class typically originates on the network, not the mobile device.

Note

This functionality is available only 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.

SmsMessageFilter

This enumerated type specifies which messages in the device message store an operation is performed on.

Note

This functionality is available only 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.

Note

This class and its methods are supported for the maintenance of legacy desktop apps that used it in earlier versions of Windows. If you do use this class, then you must specify the Windows.Devices.Sms.LegacySmsApiContract in your app's manifest. Don't use this class if you're developing a new app for Windows. Instead, use the APIs in this namespace that don't require the Windows.Devices.Sms.LegacySmsApiContract.

SmsMessageType

This enumerated type defines the format of the SMS message.

Note

This functionality is available only 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.

SmsModemErrorCode

Values that describe error codes from the SMS modem in an SmsSendMessageResult.

Delegates

SmsDeviceStatusChangedEventHandler

This handler is called when the status on the SMS device changes. Callers should implement this when they want to be notified when a significant state change occurs on the device. For example, the caller might want to know when the device is ready to send and receive messages.

Note

This functionality is available only 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.

SmsMessageReceivedEventHandler

This event handler is called when a new binary message is received. Callers should implement this when they want to handle new binary messages from a given SMS device.

Note

This functionality is available only 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.

Note

This class and its methods are supported for the maintenance of legacy desktop apps that used it in earlier versions of Windows. If you do use this class, then you must specify the Windows.Devices.Sms.LegacySmsApiContract in your app's manifest. Don't use this class if you're developing a new app for Windows. Instead, use the APIs in this namespace that don't require the Windows.Devices.Sms.LegacySmsApiContract.

Remarks

To have your background task be notified when an SMS has been received, handle the Windows.ApplicationModel.Background.SmsMessageReceivedTrigger.

See also