I​Sms​Device I​Sms​Device I​Sms​Device Interface

Definition

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

Note

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.

public interface ISmsDevicepublic interface ISmsDevicePublic Interface ISmsDevice
Attributes
Windows 10 requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.Sms.LegacySmsApiContract (introduced v1)
Capabilities
cellularMessaging sms

Properties

AccountPhoneNumber AccountPhoneNumber AccountPhoneNumber

Returns the phone number associated with the SMS device. The phone number can be used to associate incoming messages with the account and possibly an external storage mechanism such as an account inbox.

public PlatForm::String AccountPhoneNumber { get; }public string AccountPhoneNumber { get; }Public ReadOnly Property AccountPhoneNumber As string
Value
string string string

A string representation of the account phone number.

Attributes
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.Sms.LegacySmsApiContract (introduced v1)
Capabilities
cellularMessaging sms

CellularClass CellularClass CellularClass

Returns the cellular class of the SMS device. The class can be used to determine which encodings are appropriate or which device limitations are in effect.

public CellularClass CellularClass { get; }public CellularClass CellularClass { get; }Public ReadOnly Property CellularClass As CellularClass
Value
CellularClass CellularClass CellularClass

An enumerated value indicating the device's cellular class.

Attributes
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.Sms.LegacySmsApiContract (introduced v1)
Capabilities
cellularMessaging sms

DeviceStatus DeviceStatus DeviceStatus

Returns the SMS device's status, which indicates whether the device is ready, or not. It also indcates what type of problem exists if the device is not ready.

public SmsDeviceStatus DeviceStatus { get; }public SmsDeviceStatus DeviceStatus { get; }Public ReadOnly Property DeviceStatus As SmsDeviceStatus
Value
SmsDeviceStatus SmsDeviceStatus SmsDeviceStatus

An enumerated value that indicates the readiness of an SMS device to engage in cellular network traffic operations.

Attributes
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.Sms.LegacySmsApiContract (introduced v1)
Capabilities
cellularMessaging sms

MessageStore MessageStore MessageStore

Accesses the on-device message store. The store holds messages until a client can retrieve them. On some devices, for example, the store may correspond to the SIM storage for SMS messages.

public SmsDeviceMessageStore MessageStore { get; }public SmsDeviceMessageStore MessageStore { get; }Public ReadOnly Property MessageStore As SmsDeviceMessageStore
Value
SmsDeviceMessageStore SmsDeviceMessageStore SmsDeviceMessageStore

A reference to an SmsMessageStore object.

Attributes
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.Sms.LegacySmsApiContract (introduced v1)
Capabilities
cellularMessaging sms

Methods

CalculateLength(SmsTextMessage) CalculateLength(SmsTextMessage) CalculateLength(SmsTextMessage)

Estimates the transmitted message length of the specified text message. The estimate can be useful to clients who want to give an indication of how many messages will be sent on the network to carry the text of the full message.

public SmsEncodedLength CalculateLength(SmsTextMessage message)public SmsEncodedLength CalculateLength(SmsTextMessage message)Public Function CalculateLength(message As SmsTextMessage) As SmsEncodedLength
Parameters
message
SmsTextMessage SmsTextMessage SmsTextMessage

A reference to the SMS text message to measure.

Returns

A reference to an SmsEncodedLength structure that is populated with the length information.

Attributes
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.Sms.LegacySmsApiContract (introduced v1)
Capabilities
cellularMessaging sms

SendMessageAsync(ISmsMessage) SendMessageAsync(ISmsMessage) SendMessageAsync(ISmsMessage)

Asynchronously sends a message using the SMS device. The method is asynchronous because the send operation might not occur instantaneously. The asynchronous operation object is returned immediately.

public SendSmsMessageOperation SendMessageAsync(ISmsMessage message)public SendSmsMessageOperation SendMessageAsync(ISmsMessage message)Public Function SendMessageAsync(message As ISmsMessage) As SendSmsMessageOperation
Parameters
message
ISmsMessage ISmsMessage ISmsMessage

A reference to an SmsMessage object. The message can be in text or binary format.

Returns

A reference to an SendSmsMessageOperation object that supports asynchronous message sending.

Attributes
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.Sms.LegacySmsApiContract (introduced v1)
Capabilities
cellularMessaging sms

Events

SmsDeviceStatusChanged SmsDeviceStatusChanged SmsDeviceStatusChanged

Sets an event handler to be called when the status of the SMS device changes.

public abstract event SmsDeviceStatusChangedEventHandler SmsDeviceStatusChangedpublic abstract event SmsDeviceStatusChangedEventHandler SmsDeviceStatusChangedPublic MustInherit Event SmsDeviceStatusChanged
Attributes
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.Sms.LegacySmsApiContract (introduced v1)
Capabilities
cellularMessaging sms

SmsMessageReceived SmsMessageReceived SmsMessageReceived

Sets an event handler to be called when the device receives a new text message.

public abstract event SmsMessageReceivedEventHandler SmsMessageReceivedpublic abstract event SmsMessageReceivedEventHandler SmsMessageReceivedPublic MustInherit Event SmsMessageReceived
Attributes
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.Sms.LegacySmsApiContract (introduced v1)
Capabilities
cellularMessaging sms