SmsDevice2 SmsDevice2 SmsDevice2 SmsDevice2 SmsDevice2 Class

Definition

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

Note

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

public : sealed class SmsDevice2
struct winrt::Windows::Devices::Sms::SmsDevice2
public sealed class SmsDevice2
Public NotInheritable Class SmsDevice2
// This class does not provide a public constructor.
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
sms cellularMessaging

Remarks

Use this class as you would use the SmsDevice class, when you need the additional properties and methods this class provides.

Properties

AccountPhoneNumber AccountPhoneNumber AccountPhoneNumber AccountPhoneNumber AccountPhoneNumber

Gets 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 CellularClass 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.

DeviceId DeviceId DeviceId DeviceId DeviceId

The device ID of the device represented by this instance.

DeviceStatus DeviceStatus DeviceStatus DeviceStatus DeviceStatus

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

ParentDeviceId ParentDeviceId ParentDeviceId ParentDeviceId ParentDeviceId

The parent device ID of this device.

SmscAddress SmscAddress SmscAddress SmscAddress SmscAddress

Gets or sets the SMSC address of this device.

Methods

CalculateLength(ISmsMessageBase) CalculateLength(ISmsMessageBase) CalculateLength(ISmsMessageBase) CalculateLength(ISmsMessageBase) CalculateLength(ISmsMessageBase)

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

FromId(String) FromId(String) FromId(String) FromId(String) FromId(String)

Creates an instance of SmsDevice2 for a device that received an SMS message.

FromParentId(String) FromParentId(String) FromParentId(String) FromParentId(String) FromParentId(String)

Creates an instance of SmsDevice2 for a device, given the device ID of the parent device.

GetDefault() GetDefault() GetDefault() GetDefault() GetDefault()

Creates an instance of SmsDevice2 associated with the default SMS device.

GetDeviceSelector() GetDeviceSelector() GetDeviceSelector() GetDeviceSelector() GetDeviceSelector()

Retrieves the class selection string that can be used to enumerate SMS devices.

SendMessageAndGetResultAsync(ISmsMessageBase) SendMessageAndGetResultAsync(ISmsMessageBase) SendMessageAndGetResultAsync(ISmsMessageBase) SendMessageAndGetResultAsync(ISmsMessageBase) SendMessageAndGetResultAsync(ISmsMessageBase)

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

Events

DeviceStatusChanged DeviceStatusChanged DeviceStatusChanged DeviceStatusChanged DeviceStatusChanged

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