Share via


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

public interface class ISmsDevice
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Devices.Sms.LegacySmsApiContract, 65536)]
/// [Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Devices.Sms.LegacySmsApiContract)]
/// [Windows.Foundation.Metadata.Guid(152539629, 34603, 20204, 156, 114, 171, 17, 98, 123, 52, 236)]
struct ISmsDevice
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Devices.Sms.LegacySmsApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(152539629, 34603, 20204, 156, 114, 171, 17, 98, 123, 52, 236)]
/// [Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
struct ISmsDevice
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Devices.Sms.LegacySmsApiContract), 65536)]
[Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Devices.Sms.LegacySmsApiContract))]
[Windows.Foundation.Metadata.Guid(152539629, 34603, 20204, 156, 114, 171, 17, 98, 123, 52, 236)]
public interface ISmsDevice
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Devices.Sms.LegacySmsApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(152539629, 34603, 20204, 156, 114, 171, 17, 98, 123, 52, 236)]
[Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
public interface ISmsDevice
Public Interface ISmsDevice
Derived
Attributes

Windows requirements

Device family
Windows Desktop Extension SDK (introduced in 10.0.10240.0)
API contract
Windows.Devices.Sms.LegacySmsApiContract (introduced in v1.0)
App capabilities
cellularMessaging sms

Properties

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.

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.

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.

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.

Methods

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.

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.

Events

SmsDeviceStatusChanged

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

SmsMessageReceived

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

Applies to