hi this the minimal code that retrive the cell id it works on sdk 1.2 but i have problem on 2.1 sdk. on sdk 2.1 it build first time then it dont compile at all. I want it to work on 2.1 sdk.
i added header file <etelbgsm.h> and gsmbas.lib but i have still problem
RTelServer iTelServer;
RBasicGsmPhone iPhone;
_LIT(KTsyName, "phonetsy.tsy");
iTelServer.Connect();
// Load the profile of the phone
iTelServer.LoadPhoneModule( KTsyName );
// Get the phone name
RTelServer::TPhoneInfo phoneInfo;
iTelServer.GetPhoneInfo( 0, phoneInfo );
// Open the phone by name
iPhone.Open( iTelServer, phoneInfo.iName );
MBasicGsmPhoneNetwork::TCurrentNetworkInfo ni;
iPhone.GetCurrentNetworkInfo( ni );
TInt cellId = ni.iCellId;
iPhone.Close();
iTelServer.UnloadPhoneModule( KTsyName );
iTelServer.Close();
TBuf<200> text;
_LIT(message,"Cell Id : %d ");
text.Format(message,cellId);
CAknInformationNote* informationNote = new (ELeave) CAknInformationNote;
informationNote->ExecuteLD(text);