Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

(Redirected from Phone Client USSD API)

Archived:Phone Client USSD API

From 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
S60 3rd Edition FP2
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



  // 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 03:41.
52 page views in the last 30 days.