SmsDevice2 Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Extends the SmsDevice class, and supports the operation of a mobile broadband SMS 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 ref class SmsDevice2 sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class SmsDevice2 final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class SmsDevice2
Public NotInheritable Class SmsDevice2
- Inheritance
- Attributes
Windows requirements
Device family |
Windows 10 (introduced in 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
App capabilities |
cellularMessaging
sms
|
Remarks
Use this class as you would use the SmsDevice class, when you need the additional properties and methods this class provides.
Properties
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 |
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 |
The device ID of the device represented by this instance. |
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 |
The parent device ID of this device. |
SmscAddress |
Gets or sets the SMSC address of this device. |
Methods
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) |
Creates an instance of SmsDevice2 for a device that received an SMS message. |
FromParentId(String) |
Creates an instance of SmsDevice2 for a device, given the device ID of the parent device. |
GetDefault() |
Creates an instance of SmsDevice2 associated with the default SMS device. |
GetDeviceSelector() |
Retrieves the class selection string that can be used to enumerate SMS devices. |
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 |
Sets an event handler to be called when the status of the SMS device changes. |