Windows.Devices.Sms
Windows.Devices.Sms
Windows.Devices.Sms
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 only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps.
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 DeleteSmsMessageOperation DeleteSmsMessageOperation DeleteSmsMessageOperation |
Enables start, track, and end an asynchronous message delete operation for a single message. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. NoteNote 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. |
| DeleteSmsMessagesOperation DeleteSmsMessagesOperation DeleteSmsMessagesOperation DeleteSmsMessagesOperation |
Enables start, track, and end asynchronous SMS message delete operations for multiple messages. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. NoteNote 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. |
| GetSmsDeviceOperation GetSmsDeviceOperation GetSmsDeviceOperation GetSmsDeviceOperation |
Retrieves an SmsDevice object asynchronously. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. NoteNote 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. |
| GetSmsMessageOperation GetSmsMessageOperation GetSmsMessageOperation GetSmsMessageOperation |
Supports the retrieval of a message from the SMS message store. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. NoteNote 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. |
| GetSmsMessagesOperation GetSmsMessagesOperation GetSmsMessagesOperation GetSmsMessagesOperation |
Supports the retrieval of messages. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. NoteNote 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. |
| SendSmsMessageOperation SendSmsMessageOperation SendSmsMessageOperation SendSmsMessageOperation |
Enables the sending of a message. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. NoteNote 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. |
| SmsAppMessage SmsAppMessage SmsAppMessage SmsAppMessage |
The interface for manipulating an SMS Application message. Application messages are those which cannot be characterized as any other message type. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
| SmsBinaryMessage SmsBinaryMessage SmsBinaryMessage 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. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. NoteNote 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. |
| SmsBroadcastMessage SmsBroadcastMessage SmsBroadcastMessage SmsBroadcastMessage |
Represents a broadcast SMS message. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
| SmsDevice SmsDevice SmsDevice SmsDevice |
Supports the operation of a mobile broadband SMS device. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. NoteNote 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. |
| SmsDevice2 SmsDevice2 SmsDevice2 SmsDevice2 |
Extends the SmsDevice class, and supports the operation of a mobile broadband SMS device. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
| SmsDeviceMessageStore SmsDeviceMessageStore SmsDeviceMessageStore SmsDeviceMessageStore |
Provides access to the messages stored on an SMS Device and information about the message store. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. NoteNote 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. |
| SmsFilterRule SmsFilterRule SmsFilterRule SmsFilterRule |
Describes an SMS filtering rule. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
| SmsFilterRules SmsFilterRules SmsFilterRules SmsFilterRules |
A collection of SmsFilterRule instances. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
| SmsMessageReceivedEventArgs SmsMessageReceivedEventArgs SmsMessageReceivedEventArgs SmsMessageReceivedEventArgs |
Provides data for ISmsBinaryMessage event handlers. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. NoteNote 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. |
| SmsMessageReceivedTriggerDetails SmsMessageReceivedTriggerDetails SmsMessageReceivedTriggerDetails SmsMessageReceivedTriggerDetails |
Contains event details for the event raised when an SMS message is received. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
| SmsMessageRegistration SmsMessageRegistration SmsMessageRegistration SmsMessageRegistration |
Class used to represent registered message filters. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
| SmsReceivedEventDetails SmsReceivedEventDetails SmsReceivedEventDetails SmsReceivedEventDetails |
Presents the details of SMS message events to the background work item that handles messages while your app is suspended. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. NoteNote 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. |
| SmsSendMessageResult SmsSendMessageResult SmsSendMessageResult SmsSendMessageResult |
Encapsulates the results of calling SmsDevice2.SendMessageAndGetResultAsync. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
| SmsStatusMessage SmsStatusMessage SmsStatusMessage SmsStatusMessage |
Encapsulates an SMS status message. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. 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 SmsTextMessage SmsTextMessage 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. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. NoteNote 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. |
| SmsTextMessage2 SmsTextMessage2 SmsTextMessage2 SmsTextMessage2 |
Encapsulates a decoded SMS text message. Prefer this class to the older SmsTextMessage class. NoteThis functionality is only available to mobile operator apps and Windows Store app 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. |
| SmsVoicemailMessage SmsVoicemailMessage SmsVoicemailMessage SmsVoicemailMessage |
Encapsulates an SMS voicemail message. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
| SmsWapMessage SmsWapMessage SmsWapMessage SmsWapMessage |
Represents an SMS WAP push message. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
Structs
| SmsEncodedLength SmsEncodedLength SmsEncodedLength SmsEncodedLength |
This structure represents information about the length of an SmsTextMessage object when it is encoded as a PDU. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
Interfaces
| ISmsBinaryMessage ISmsBinaryMessage ISmsBinaryMessage 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). NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
| ISmsDevice ISmsDevice ISmsDevice ISmsDevice |
This interface controls a mobile broadband SMS device. It is the primary entry point to SMS services on the device. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
| ISmsMessage ISmsMessage ISmsMessage ISmsMessage |
This interface is implemented by all types of SMS messages that are supported. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
| ISmsMessageBase ISmsMessageBase ISmsMessageBase ISmsMessageBase |
This interface specifies base functionality for all SMS message types. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
| ISmsTextMessage ISmsTextMessage ISmsTextMessage 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. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. NoteNote 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. |
Enums
| CellularClass CellularClass CellularClass CellularClass |
This enumerated type defines the type of radio standard in a device. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
| SmsBroadcastType SmsBroadcastType SmsBroadcastType SmsBroadcastType |
Values that describe the type of a broadcast (emergency alert) message. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
| SmsDataFormat SmsDataFormat SmsDataFormat SmsDataFormat |
This enumerated type identifies the format of a given protocol description unit (PDU) buffer. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
| SmsDeviceStatus SmsDeviceStatus SmsDeviceStatus SmsDeviceStatus |
Contains values that indicate the readiness of an SMS device to engage in cellular network traffic operations. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
| SmsEncoding SmsEncoding SmsEncoding SmsEncoding |
This enumerated type is used to determine the encoding algorithm to send or calculate the length of an SmsTextMessage object. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
| SmsFilterActionType SmsFilterActionType SmsFilterActionType 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. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
| SmsGeographicalScope SmsGeographicalScope SmsGeographicalScope SmsGeographicalScope |
Values that describe the geographical scope of a cell broadcast message. |
| SmsMessageClass SmsMessageClass SmsMessageClass SmsMessageClass |
This enumerated type specifies the message class of a message. The message class typically originates on the network, not the mobile device. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
| SmsMessageFilter SmsMessageFilter SmsMessageFilter SmsMessageFilter |
This enumerated type specifies which messages in the device message store an operation is performed on. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. NoteNote 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. |
| SmsMessageType SmsMessageType SmsMessageType SmsMessageType |
This enumerated type defines the format of the SMS message. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
| SmsModemErrorCode SmsModemErrorCode SmsModemErrorCode SmsModemErrorCode |
Values that describe error codes from the SMS modem in an SmsSendMessageResult. |
Delegates
| SmsDeviceStatusChangedEventHandler SmsDeviceStatusChangedEventHandler SmsDeviceStatusChangedEventHandler 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. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. |
| SmsMessageReceivedEventHandler SmsMessageReceivedEventHandler SmsMessageReceivedEventHandler 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. NoteThis functionality is only available to mobile operator apps and Windows Store app given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps. NoteNote 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. |
Remarks
To have your background task be notified when an SMS has been received, handle the Windows.ApplicationModel.Background.SmsMessageReceivedTrigger.