Windows Dev Center

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  This functionality is only available to mobile operator apps and Windows Store apps given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: Windows Store device apps.

Note  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.

Members

The Windows.Devices.Sms namespace has these types of members:

Classes

ClassDescription
DeleteSmsMessageOperation Enables start, track, and end an asynchronous message delete operation for a single message.
DeleteSmsMessagesOperation Enables start, track, and end asynchronous SMS message delete operations for multiple messages.
GetSmsDeviceOperation Retrieves an SmsDevice object asynchronously.
GetSmsMessageOperation Supports the retrieval of a message from the SMS message store.
GetSmsMessagesOperation Supports the retrieval of messages.
SendSmsMessageOperation Enables the sending of a message.
SmsAppMessage The interface for manipulating an SMS Application message. Application messages are those which cannot be characterized as any other message type.
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.
SmsBroadcastMessage Represents a broadcast SMS message.
SmsDevice Supports the operation of a mobile broadband SMS device.
SmsDevice2 Extends the SmsDevice class, and supports the operation of a mobile broadband SMS device.
SmsDeviceMessageStore Provides access to the messages stored on an SMS Device and information about the message store.
SmsFilterRule Describes an SMS filtering rule.
SmsFilterRules A collection of SmsFilterRule instances.
SmsMessageReceivedEventArgs Provides data for ISmsBinaryMessage event handlers.
SmsMessageReceivedTriggerDetails Contains event details for the event raised when an SMS message is received.
SmsMessageRegistration Class used to represent registered message filters.
SmsReceivedEventDetails Presents the details of SMS message events to the background work item that handles messages while your app is suspended.
SmsSendMessageResult Encapsulates the results of calling SmsDevice2.SendMessageAndGetResultAsync.
SmsStatusMessage Encapsulates an SMS status message.
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.
SmsTextMessage2 Encapsulates a decoded SMS text message. Prefer this class to the older SmsTextMessage class.
SmsVoicemailMessage Encapsulates an SMS voicemail message.
SmsWapMessage Represents an SMS WAP push message.

 

Delegates

The Windows.Devices.Sms namespace has these delegates.

DelegateDescription
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.
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.

 

Enumerations

The Windows.Devices.Sms namespace has these enumerations.

EnumerationDescription
CellularClass This enumerated type defines the type of radio standard in a device.
SmsBroadcastType Values that describe the type of a broadcast (emergency alert) message.
SmsDataFormat This enumerated type identifies the format of a given protocol description unit (PDU) buffer.
SmsDeviceStatus Contains values that indicate the readiness of an SMS device to engage in cellular network traffic operations.
SmsEncoding This enumerated type is used to determine the encoding algorithm to send or calculate the length of an SmsTextMessage object.
SmsFilterActionType Values that describe the action to be taken on a message filter.
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.
SmsMessageFilter This enumerated type specifies which messages in the device message store an operation is performed on.
SmsMessageType This enumerated type defines the format of the SMS message.
SmsModemErrorCode Values that describe error codes from the SMS modem in an SmsSendMessageResult.

 

Interfaces

The Windows.Devices.Sms namespace defines these interfaces.

InterfaceDescription
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).
ISmsDevice This interface controls a mobile broadband SMS device. It is the primary entry point to SMS services on the device.
ISmsMessage This interface is implemented by all types of SMS messages that are supported.
ISmsMessageBase This interface specifies base functionality for all SMS message types.
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.

 

Structures

The Windows.Devices.Sms namespace has these structures.

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

 

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

None supported

Namespace

Windows.Devices.Sms
Windows::Devices::Sms [C++]

Metadata

Windows.winmd

Capabilities

sms

 

 

Show:
© 2015 Microsoft