Share via


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

Note

This class and its methods are supported for the maintenance of legacy desktop apps that used it in earlier versions of Windows. If you do use this class, then you must specify the Windows.Devices.Sms.LegacySmsApiContract in your app's manifest. Don't use this class if you're developing a new app for Windows. Instead, use the APIs in this namespace that don't require the Windows.Devices.Sms.LegacySmsApiContract.

public ref class SmsBinaryMessage sealed : ISmsBinaryMessage
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Devices.Sms.LegacySmsApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Devices.Sms.LegacySmsApiContract, 65536)]
/// [Windows.Foundation.Metadata.Deprecated("SmsBinaryMessage may be altered or unavailable for releases after Windows 10. Instead, use SmsAppMessage.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Devices.Sms.LegacySmsApiContract)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class SmsBinaryMessage final : ISmsBinaryMessage
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Devices.Sms.LegacySmsApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Devices.Sms.LegacySmsApiContract")]
/// [Windows.Foundation.Metadata.Deprecated("SmsBinaryMessage may be altered or unavailable for releases after Windows 10. Instead, use SmsAppMessage.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
class SmsBinaryMessage final : ISmsBinaryMessage
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Devices.Sms.LegacySmsApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Devices.Sms.LegacySmsApiContract), 65536)]
[Windows.Foundation.Metadata.Deprecated("SmsBinaryMessage may be altered or unavailable for releases after Windows 10. Instead, use SmsAppMessage.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Devices.Sms.LegacySmsApiContract))]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class SmsBinaryMessage : ISmsBinaryMessage
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Devices.Sms.LegacySmsApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Devices.Sms.LegacySmsApiContract")]
[Windows.Foundation.Metadata.Deprecated("SmsBinaryMessage may be altered or unavailable for releases after Windows 10. Instead, use SmsAppMessage.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
public sealed class SmsBinaryMessage : ISmsBinaryMessage
function SmsBinaryMessage()
Public NotInheritable Class SmsBinaryMessage
Implements ISmsBinaryMessage
Inheritance
Object Platform::Object IInspectable SmsBinaryMessage
Attributes
Implements

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

Constructors

SmsBinaryMessage()

Creates an instance of the SmsBinaryMessage class.

Properties

Format

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

Id

Indicates the ID of the asynchronous message operation.

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.

Methods

GetData()

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

SetData(Byte[])

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

Applies to