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 Windows Store 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 : IUssdMessagepublic sealed class UssdMessage : IUssdMessagePublic NotInheritable Class UssdMessage Implements IUssdMessage// You can use this class in JavaScript.
- Attributes
| 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)
|
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 Windows Store 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)// You can use this method in JavaScript.
- messageText
- PlatForm::String String String String
The payload for the UssdMessage.
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 Windows Store 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// You can use this property in JavaScript.
- Value
- byte byte byte byte
The encoding scheme of the payload of this UssdMessage.
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 Windows Store 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// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The payload of this UssdMessage as text.
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 Windows Store 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[]// You can use this method in JavaScript.
The raw payload of this UssdMessage.
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 Windows Store 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// You can use this method in JavaScript.
- value
- Byte[] Byte[] Byte[] Byte[]
The raw payload of this UssdMessage.
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.