UssdMessage UssdMessage UssdMessage UssdMessage Class

Definition

Represents a USSD message that is used for sending messages to and receiving messages from the network.

Note

This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : sealed class UssdMessage : IUssdMessage
public sealed class UssdMessage : IUssdMessage
Public NotInheritable Class UssdMessage Implements IUssdMessage
var ussdMessage = new ussdMessage(messageText);
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
cellularDeviceControl cellularDeviceIdentity

Constructors

UssdMessage(String) UssdMessage(String) UssdMessage(String) UssdMessage(String)

Creates a new instance of a UssdMessage and encodes the supplied string into the message payload.

Note

This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : UssdMessage(Platform::String messageText)
public UssdMessage(String messageText)
Public Sub New(messageText As String)
var ussdMessage = new ussdMessage(messageText);
Parameters
messageText
Platform::String String String String

The payload for the UssdMessage.

Additional features and 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
cellularDeviceControl cellularDeviceIdentity

Remarks

The default UssdMessage constructor assigns the default DataCodingScheme value and encodes the string supplied to the constructor into the message payload.

Properties

DataCodingScheme DataCodingScheme DataCodingScheme DataCodingScheme

Gets or sets the encoding scheme of the payload of this UssdMessage.

Note

This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : byte DataCodingScheme { get; set; }
public byte DataCodingScheme { get; set; }
Public ReadWrite Property DataCodingScheme As byte
var byte = ussdMessage.dataCodingScheme;
ussdMessage.dataCodingScheme = byte;
Value
byte byte byte byte

The encoding scheme of the payload of this UssdMessage.

Additional features and 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
cellularDeviceControl cellularDeviceIdentity

Remarks

The data coding scheme is part of the USSD protocol. It is defined in 3GPP TS 23.038 chapter 5, CBS Data Coding Scheme

.

When a message is encoded in the default coding scheme, you can access the payload as text using the PayloadAsText property.

PayloadAsText PayloadAsText PayloadAsText PayloadAsText

Gets or sets the payload of this UssdMessage as text.

Note

This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : Platform::String PayloadAsText { get; set; }
public string PayloadAsText { get; set; }
Public ReadWrite Property PayloadAsText As string
var string = ussdMessage.payloadAsText;
ussdMessage.payloadAsText = string;
Value
Platform::String string string string

The payload of this UssdMessage as text.

Additional features and 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
cellularDeviceControl cellularDeviceIdentity

Remarks

The PayloadAsText property can be used with the default DataCodingScheme value, which supports only ASCII characters. The maximum length of a message is using the default data-coding scheme is 182 characters.

Methods

GetPayload() GetPayload() GetPayload() GetPayload()

Gets the raw payload of this UssdMessage.

Note

This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : byte[] GetPayload()
public byte[] GetPayload()
Public Function GetPayload() As byte[]
var byte[] = ussdMessage.getPayload();
Returns
byte[] byte[] byte[] byte[]

The raw payload of this UssdMessage.

Additional features and 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
cellularDeviceControl cellularDeviceIdentity

Remarks

The DataCodingScheme property identifies how the payload is encoded.

The maximum size of the raw payload is 160 bytes.

SetPayload(Byte[]) SetPayload(Byte[]) SetPayload(Byte[]) SetPayload(Byte[])

Sets the raw payload of this UssdMessage.

Note

This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : void SetPayload(Byte[] value)
public void SetPayload(Byte[] value)
Public Function SetPayload(value As Byte[]) As void
ussdMessage.setPayload(value);
Parameters
value
Byte[] Byte[] Byte[] Byte[]

The raw payload of this UssdMessage.

Additional features and 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
cellularDeviceControl cellularDeviceIdentity

Remarks

When you set the raw payload for a UssdMessage, you must first set the DataCodingScheme property to the encoding scheme for the message. If you do not set the DataCodingScheme property, the default coding scheme is used.

If you use the default coding scheme, you can access the payload as text using the PayloadAsText property.

The maximum size of the raw payload is 160 bytes.