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);
Symbian :Retrieve Cell ID
最新推荐文章于 2016-05-25 16:45:52 发布
博主分享在Symbian SDK中获取Cell ID的代码,代码在SDK 1.2可运行,但在SDK 2.1首次构建后无法编译。博主添加了头文件<etelbgsm.h>和gsmbas.lib仍存在问题,并给出了获取Cell ID的具体代码。
1024

被折叠的 条评论
为什么被折叠?



