Archived:Phone Client USSD API
Archived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.
Article Metadata
Note: :This API is not part of the public SDK. It can be found in the SDK API Plug-in.
The Phone Client USSD API provides the class CPhClientUSSD to programmatically send USSD messages.
Use cases
This API can be used to send a USSD message programmatically and to check the balance of a prepaid subscription.
Example code
Header file
#include <CPhCltUssd.h> // New header for 3.2
Library
"phoneclient.lib"
// Construct CPhCltUssd and pass ETrue
// as parameter (notes are shown on screen)
CPhCltUssd* ussdClient = CPhCltUssd::NewL( ETrue );
CleanupStack::PushL( ussdClient );
TBuf<16> aMessage;
aMessage.Copy( _L("*101#") ); // USSD code for checking prepaid balance
TInt result = ussdClient->SendUssd( aMessage );
...
CleanupStack::PopAndDestroy( ussdClient );


PallaviMajgaokar - Use "Phone Release"
To build, use the "Phone Release" or "Phone Debug" mode. It does not work for "Emulator Debug" mode... Use network control Capability.
PallaviMajgaokar 15:41, 15 June 2011 (EEST)