Symbian :Retrieve Cell ID

博主分享在Symbian SDK中获取Cell ID的代码,代码在SDK 1.2可运行,但在SDK 2.1首次构建后无法编译。博主添加了头文件<etelbgsm.h>和gsmbas.lib仍存在问题,并给出了获取Cell ID的具体代码。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

http://discussion.forum.nokia.com/forum/showthread.php?s=3e73d93debcfa9b7daf449e1eaff6696&threadid=47318&highlight=%2Aprofile%2A

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);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值