SmsBinaryMessage SmsBinaryMessage SmsBinaryMessage SmsBinaryMessage Class

Definition

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.

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.

Note

Note that this class and its methods are supported for the maintenance of legacy desktop apps that used it in earlier versions of Windows; and if you do use this class, you must specify the Windows.Devices.Sms.LegacySmsApiContract in your app's manifest. Do not use this class if you are developing new apps for Windows 10. Instead, use the members of this namespace that do not require the Windows.Devices.Sms.LegacySmsApiContract.

public : sealed class SmsBinaryMessage : ISmsBinaryMessage, ISmsMessage
public sealed class SmsBinaryMessage : ISmsBinaryMessage, ISmsMessage
Public NotInheritable Class SmsBinaryMessage Implements ISmsBinaryMessage, ISmsMessage
var smsBinaryMessage = new smsBinaryMessage();
Attributes
Windows 10 requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.Sms.LegacySmsApiContract (introduced v1)
Capabilities
sms cellularMessaging

Constructors

SmsBinaryMessage() SmsBinaryMessage() SmsBinaryMessage() SmsBinaryMessage()

Creates an instance of the SmsBinaryMessage class.

public : SmsBinaryMessage()
public SmsBinaryMessage()
Public Sub New()
var smsBinaryMessage = new smsBinaryMessage();
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.Sms.LegacySmsApiContract (introduced v1)
Capabilities
sms cellularMessaging

Properties

Format Format Format Format

Retrieves the detected protocol description unit (PDU) format of this message.

public : SmsDataFormat Format { get; set; }
public SmsDataFormat Format { get; set; }
Public ReadWrite Property Format As SmsDataFormat
var smsDataFormat = smsBinaryMessage.format;
smsBinaryMessage.format = smsDataFormat;
Value
SmsDataFormat SmsDataFormat SmsDataFormat SmsDataFormat

An enumerated value describing the SMS data format.

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

Id Id Id Id

Indicates the ID of the asynchronous message operation.

public : unsigned int Id { get; }
public uint Id { get; }
Public ReadOnly Property Id As uint
var uint = smsBinaryMessage.id;
Value
unsigned int uint uint uint

An integer uniquely representing the asynchronous operation.

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

MessageClass MessageClass MessageClass MessageClass

Returns the message class, as determined by the operator's message network. The two most common classes are None (normal message) or Class0 (special operator message, such as a roaming warning that must be shown immediately to the user). A typical client for end-user messages ignores Class0 messages.

public : SmsMessageClass MessageClass { get; }
public SmsMessageClass MessageClass { get; }
Public ReadOnly Property MessageClass As SmsMessageClass
var smsMessageClass = smsBinaryMessage.messageClass;
Value
SmsMessageClass SmsMessageClass SmsMessageClass SmsMessageClass

A value from the SmsMessageClass enumeration.

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

Methods

GetData() GetData() GetData() GetData()

Returns the raw buffer of the message in binary protocol description unit (PDU) format as a byte array.

public : byte[] GetData()
public byte[] GetData()
Public Function GetData() As byte[]
var byte[] = smsBinaryMessage.getData();
Returns
byte[] byte[] byte[] byte[]

A byte array representing message data. If there is no message data, the returned array is empty.

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

SetData(Byte[]) SetData(Byte[]) SetData(Byte[]) SetData(Byte[])

Specifies the raw binary payload of the SMS message. It should be formatted according to the protocol description unit (PDU) standard.

public : void SetData(Byte[] value)
public void SetData(Byte[] value)
Public Function SetData(value As Byte[]) As void
smsBinaryMessage.setData(value);
Parameters
value
Byte[] Byte[] Byte[] Byte[]

A byte array representing message data. If there is no message data, the returned array is empty.

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