×
Namespaces

Variants
Actions
(Redirected from Phone Client USSD API)

Archived:Phone Client USSD API

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: 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
Compatibility
Platform(s):
S60 3rd Edition FP2
Article
Created: kiran.mudiyam (06 Jun 2008)
Last edited: hamishwillee (21 Jun 2012)

Note.pngNote: :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 );
This page was last modified on 21 June 2012, at 06:41.
102 page views in the last 30 days.
×