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 over the next few weeks. Thanks for all your past and future contributions.

Cell ID with CTelephony

From Wiki
Jump to: navigation, search
Article Metadata
Created: symbianyucca (27 Mar 2007)
Last edited: hamishwillee (30 May 2013)
Reviewer Approved    Thumbs up icon sm.jpg

CCellIDCheck implementation illustrates how to get Cell ID information using CTelephony. Note that this example is intended to be used only with S60 3rd Edition devices, and does not work with pre-3rd Edition devices.

To use this example first implement the callback interface function in the implementing class and then construct an instance of the CCellIDCheck. The callback function will be then called with the current Cell Id information. The aCountryCode argument variable will have the three digit country code of the network, and aNwId will have two digit network operator identification inside that country.

aAreaCode then indicates a area inside the operators network and the aCellId is unique cell identifier inside that operators area.

Headers required:

#include <Etel3rdParty.h>

Library required:

LIBRARY etel3rdparty.lib

Capabilities required:

capability ReadUserData ReadDeviceData Location


delete iTelephony;
void CCellIDCheck::ConstructL(void)
iTelephony = CTelephony::NewL();
iTelephony->GetCurrentNetworkInfo(iStatus, iIdV1Pkg);
CCellIDCheck::CCellIDCheck(MCellIdObserver& aObserver)
: CActive(EPriorityNormal),iObserver(aObserver),iIdV1Pkg(iIdV1)
void CCellIDCheck::RunL()
void CCellIDCheck::DoCancel()


#include <Etel3rdParty.h>
class MCellIdObserver
virtual void CellIDL(const TDesC& aCountryCode,const TDesC& aNwId,TUint aAreaCode,TUint aCellId) = 0;
class CCellIDCheck : public CActive
CCellIDCheck(MCellIdObserver& aObserver);
void ConstructL(void);
void RunL();
void DoCancel();
MCellIdObserver& iObserver;
CTelephony* iTelephony;
CTelephony::TNetworkInfoV1 iIdV1;
CTelephony::TNetworkInfoV1Pckg iIdV1Pkg;

Related Links

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

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.