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.

PS Keys for Call Status & Indicators API

From Wiki
Jump to: navigation, search
Article Metadata
Code ExampleArticle
Created: ltomuta (16 Jun 2007)
Last edited: hamishwillee (30 May 2013)

Note.pngNote: :This API is not part of the public SDK. It can be found in the SDK API Plug-in.

PS Keys for Call Status & Indicators API provide keys to check the Telephony Call Status like Dialling, Answering, Ringing, Hold state etc, and Telephony Call Type like Data call, Voice Call, Fax etc.

Use cases

They can be used to know the call type and status of ongoing call.

Example code

The following are the Uid & UInt values provided:

//Telephony call handling PS Uid. 
const TUid KPSUidTelephonyCallHandling = {0x101F8787};
//State of ongoing call(s).
const TUint32 KTelephonyCallState = 0x00000004;
//Type of ongoing call.
const TUint32 KTelephonyCallType = 0x00000005;

The above said can be achieved by passing KPSUidTelephonyCallHandling(Telephony call handling PS Uid) and KTelephonyCallState or KTelephonyCallType to Get() method of RProperty which is the User side interface to Publish & Subscribe, as shown in the example below.

The RProperty type of KTelephonyCallState & KTelephonyCallType property is EInt.

void CCallStatusAppUi::GetTelephonyStateAndType()
TBuf<25> printInfo;
TInt aVal;
RProperty iRP;
// Call Status
CEikonEnv::InfoWinL(_L("Phone Status:"),printInfo);
// Call Type
CEikonEnv::InfoWinL(_L("Phone Type:"),printInfo);

The enumerations are as follows :

enum TPSTelephonyCallState : EPSTelephonyCallStateUninitialized, EPSTelephonyCallStateNone, EPSTelephonyCallStateAlerting, EPSTelephonyCallStateRinging, EPSTelephonyCallStateDialling, EPSTelephonyCallStateAnswering, EPSTelephonyCallStateDisconnecting, EPSTelephonyCallStateConnected, EPSTelephonyCallStateHold

enum TPSTelephonyCallType : EPSTelephonyCallTypeUninitialized, EPSTelephonyCallTypeNone, EPSTelephonyCallTypeCSVoice, EPSTelephonyCallTypeFax, EPSTelephonyCallTypeData, EPSTelephonyCallTypeHSCSD, EPSTelephonyCallTypeH324Multimedia, EPSTelephonyCallTypeVoIP

Example project

This page was last modified on 30 May 2013, at 04:39.
59 page views in the last 30 days.