How to retrieve the phone IMEI code on UIQ3.0

政府如何解决科技项目评估效率低、标准不统一、信息不对称的问题?.docx 政府如何解决科技项目评估效率低、标准不统一、信息不对称的问题? 立即下载

  Here I’ll present an approach to retrieve IMEI code by calling functions of class RMobilePhone. I have debugged these source codes on W950 (Symbian 9.1, UIQ3.0).

You can get some description of the format of IMEI code in [1]. In this paper, the PlpVariant::GetMachineIdL function is called to retrieve the phone IMEI code, but this function has been deprecated on UIQ3.0. So if you call it, you maybe will retrieve a incorrect IMEI code. I have debugged it on W950, the return is ‘14750005-630771776’. My phone IMEI code is actually ‘00440107-000879-8’.
And the link [2] provides another approach, but it’s so hard to get the mentioned .h files and librarys. I can not find them, so I did not debug it.
On UIQ 3.0, class RMobilePhone provides client access to mobile phone functionality provided by TSY. You can get the detailed description of class RMobilePhone in the help document of UIQ SDK.
My steps are as following:
1. Connect to the ETel server
2. Get the name of registered phones
3. Open mobile phone sub session
4. Check if the phone provided the capabilities to retrieve IMEI code or not
5. Retrieve the phone IMEI code
                                         
The defined parameters:
RTelServer iTelServer;    // Root telephony server session
RMobilePhone iMmPhone;
TBuf< KCommsDbSvrMaxFieldLength> iPhoneName
RMobilePhone::TMobilePhoneIdentityV1 iPhoneId;
1. Connect to the ETel server
User::LeaveIfError(iTelServer.Connect());
2. Get the name of registered phones
// Get the number of registered phones
TInt numberOfPhones;
User::LeaveIfError(aTelServer.EnumeratePhones(numberOfPhones));
LOG("%i",numberOfPhones);
for( TInt i = 0; i <numberOfPhones ; i++ )
{
RTelServer::TPhoneInfo info;
iTelServer.GetPhoneInfo(i,info);
LOG("NetworkTyp:[%i],Name:[%S],NumberofLines:[%i],Extensions:[%i]",              (TInt)info.iNetworkType,&info.iName,info.iNumberOfLines,info.iExtensions);
iPhoneName.Copy(info.iName);
}
In your smart phone, there can be several registered phones i.e. the returned value of ‘number ofPhones’ can be more than 1. hence you need to choice one directly or adopt other policy.But fortunately most of the smart phones have just one
3. Open mobile phone sub session
// open mobile phone sub session     
User::LeaveIfError(iMmPhone.Open(iTelServer, iPhoneName));
4. Check if the phone provided the capabilities to retrieve IMEI code or not
 And call the RMobilePhone::GetPhoneId function to retrieve IMEI.
TUint32 lCaps = 0;
TInt err = iMmPhone.GetIdentityCaps(lCaps);
if(err != KErrNone && err != KErrNotSupported)
        {
        LOG(_L("an unexpected error occoured"));
        }
else if(err == KErrNotSupported)
        {
        LOG(_L("RMobilePhone::GetIdentityCaps() returned KErrNotSupported "));                                            
        }
else if (lCaps & RMobilePhone::KCapsGetSerialNumber)
        {
        iMmPhone.GetPhoneId(iStatus, iPhoneId); // asynchronous call
        iActiveStatus = ST_GET_PHONE_ID;
        SetActive();
        return;
        }
// very important, Otherwise application will panic when called twice
iMmPhone.Close();
iTelServer.Close();
The function,RMobilePhone:: GetPhoneId, is the key function. In fact, here I introduce how to use it.
5. After returning, the value of the parameter, iPhoneId.iSerialNumber, is the phone IMEI code
6. Don't forget to close the opened handles as like:
iMmPhone.Close();
iTelServer.Close();
 
Reference:
1.       “Retrieving the device IMEI code”
2.       “FAQ & Tech Tips”

    http://www2.symbian.com/faq.nsf/7b5405edb1250e7c802569ee005d054e/ba491eaeb25c5c7d80256bf3003e75fc?OpenDocument 

16A.rar 当 CAD 缺失对应字体时,图纸文字会显示异常,出现乱码、问号。将下载好的字体文件复制到 AutoCAD 的 Fonts 文件夹中,即可恢复正常显示。 立即下载

相关推荐

某老年人办公楼电气图纸.dwg.rar

某老年人办公楼电气图纸.dwg.rar

QWERTY,QWERTZ和AZERTY

1> QWERTY现在通用的QWERTY键盘,以键盘第一排字母的左边6个字母而得名。 2> QWERTZ3> AZERTY

Mark.Yin 的专栏----人民需要无线 1万+

门卫电气设计图.pdf.rar

门卫电气设计图.pdf.rar

ds&dm到底包含了哪些协议

 Device management is the generic term used for technology that allows third parties to carry out the difficult procedures of configuring mobile devices on behalf of the end user (customer). Third

Mark.Yin 的专栏----人民需要无线 4068

在s60上如何使用hooklogger

       在一些论坛上总是看到这样的帖子:我的程序运行到什么什么状态后突然退出了;我的程序无法启动;我的程序有内存泄漏问题等等。实际上诸如这样的问题都可以通过hooklogger获得很多有用的信息。在这里再一次由衷地赞美一下hooklogger,非常好的debug工具,哈!以前我写过一篇关于如何使用hookblogger的blog(参见 HookLogger在UIQ上的使用方法)。尽管那是

Mark.Yin 的专栏----人民需要无线 3266

Carbide.c++ 2.0 免费下载

下载link:  http://www.forum.nokia.com/info/sw.nokia.com/id/dbb8841d-832c-43a6-be13-f78119a2b4cb.html 更多内容参见: http://markyinsystem.blogspot.com/2009/10/carbidec-20.html

Mark.Yin 的专栏----人民需要无线 2973

OpenMAX入门

建了个新的blog

Mark.Yin 的专栏----人民需要无线 2586

数据同步协议---SyncML入门

   概述             SyncML是目前行业通用的移动数据同步化协议。它由SyncML initiative制定,是一种开放性协议。SyncML initiative最初由行业先锋Ericsson, IBM, Lotus, Motorola, Nokia, Palm Inc., Psion, Starfish Software初创,Matsushita最近也加入其中,使其会员

Mark.Yin 的专栏----人民需要无线 2158

HookLogger在UIQ上的使用方法

HookLogger是Symbian提供的一个基于windows的强大工具。当模拟器运行的时候,它能记录应用程序堆栈使用情况、当前运行的线程等等。在这里我们最关心的是应用程序堆栈使用情况。在这里我想强调的是:1〉hooklogger仅仅是记录了所有在heap上分配的cell的相关信息,包括这个cell的地址以及分配这个cell的函数调用栈等等。2〉hooklogger并不能在编译或者执

Mark.Yin 的专栏----人民需要无线 2108

TTime::FormatL的一些例子

  TTime currentTime;currentTime.HomeTime();TBuf100> time;currentTime.FormatL(time,_L("%Y_%M_%D_%H_%T_%S_%C")); //___18_13_37_474750LOG(time);currentTime.FormatL(time,_L("%Y %M %D %H%T%S%C"));    /

Mark.Yin 的专栏----人民需要无线 1954

在symbian上配置使用python

我的环境 # windows xp # S60 5th Edition SDK # python for S60 1.9.7 # python 2.5 https://garage.maemo.org/frs/?group_id=854&release_id=2763 PythonForS60_1.9.7_Setup.exe pips.sisx PythonScriptShell_

Mark.Yin 的专栏----人民需要无线 1218

一个浮动的小窗口

注意蓝色的小框,那个小窗体可以到处拖动,本来想拷贝一个在standby上拖动的。一忙给忘了,现在也懒得再弄了。 至少可以在上面放个钟表 2008-9-16 今天看到在https://developer.sonyericsson.com/site/global/techsupport/tipstrickscode/symbian/p_symbian_0801.jsp也有一个实现,这个

Mark.Yin 的专栏----人民需要无线 1058

UIQ3上拷屏软件FastScreenshot

        昨天向测试部门要了一个拷屏软件,安装后发现很不稳定,而且要求phone是debug版本的phone,但是平时我很不喜欢debug版本的,太容易死机!!!为了用这个软件,重新flash了手机,麻烦!要不自己做一个1> 需要一些关于图形的知识。以前熟悉bmp和jpeg2000,把标准都快翻烂了。不过现在好像什么也想不起来。:( 。下面是我总结的一些关于图形格式的资料,比较h

Mark.Yin 的专栏----人民需要无线 993

Sans Serif字体与Serif字体的区别

http://markyinsystem.blogspot.com/

Mark.Yin 的专栏----人民需要无线 973

MMI of UIQ3) -----Context bar

http://markyinsystem.blogspot.com/

Mark.Yin 的专栏----人民需要无线 943

symbian要复活

Nokia发布了基于Symbian Belle的三款手机. 下面是其中之一: nokia 700.貌似耳目一新阿. 下周有时间好好看看,哈,一个摩托让大家清醒不少啊

Mark.Yin 的专栏----人民需要无线 929
上一篇: J2ME主要标准简介(转)
下一篇: SAX与DOM之间的区别
mickeyfirst
博客等级 码龄25年 82粉丝 179原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值