SmsBinaryMessage SmsBinaryMessage SmsBinaryMessage SmsBinaryMessage Class

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 Windows Store app 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.

Syntax

Declaration

public sealed class SmsBinaryMessagepublic sealed class SmsBinaryMessagePublic NotInheritable Class SmsBinaryMessage

Constructors summary

Creates an instance of the SmsBinaryMessage class.

Properties summary

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

Indicates the ID of the asynchronous message operation.

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.

Methods summary

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

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

Constructors

  • SmsBinaryMessage()
    SmsBinaryMessage()
    SmsBinaryMessage()
    SmsBinaryMessage()

    Creates an instance of the SmsBinaryMessage class.

    public SmsBinaryMessage()public SmsBinaryMessage()Public Function SmsBinaryMessage() As

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

    Property Value

  • Id
    Id
    Id
    Id

    Indicates the ID of the asynchronous message operation.

    public uint Id { get; }public uint Id { get; }Public ReadOnly Property Id As uint

    Property Value

    • uint
      uint
      uint
      uint

      An integer uniquely representing the asynchronous operation.

  • 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

    Property Value

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[]

    Returns

    • byte[]
      byte[]
      byte[]
      byte[]

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

  • SetData(System.Byte[])
    SetData(System.Byte[])
    SetData(System.Byte[])
    SetData(System.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(System.Byte[] value)public void SetData(System.Byte[] value)Public Function SetData(value As System.Byte[]) As void

    Parameters

    • value
      System.Byte[]
      System.Byte[]
      System.Byte[]
      System.Byte[]

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

Device family

Windows Desktop Extension SDK (introduced v10.0.10240.0)

API contract

Windows.Devices.Sms.LegacySmsApiContract (introduced v1)

Capabilities

sms
cellularMessaging

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.DualApiPartitionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.DeprecatedAttribute

Details

Assembly

Windows.Devices.Sms.dll