How to use IMEI-based protection on N7710?
| Mon, 2006-01-02 01:10 | |
|
Is there any working way how to get programatically IMEI from N7710 to protect an application written for this platform? All solutions working well on S60, S80, UIQ devices, all IMEI-regarded tips mentioned in this forum and on www.symbian.com seem not to work correctly on N7710 for me.
Neither ETel3rdParty nor Mobinfo usage gives a proper result, on N7710. Is there a way to get it work? Does anybody know how to achieve this? Thanks. midnightowl |
|






Forum posts: 39
// CIMEIRetriever
/////////////////////////////////////////////////////////////////////////
class CIMEIRetriever : public CActive
{
public:
static void GetIMEIL(TDes& aPhoneId);
protected:
CIMEIRetriever(TDes& aPhoneId);
~CIMEIRetriever();
void ConstructL();
void DoCancel();
void RunL();
CTelephony* iTelephony;
TDes& iIMEI;
CTelephony::TPhoneIdV1 iPhoneId;
};
// CIMEIRetriever
/////////////////////////////////////////////////////////////////////////
void CIMEIRetriever::GetIMEIL(TDes& aIMEI)
{
LOG_F(CIMEIRetriever::GetIMEIL);
CIMEIRetriever* self = new (ELeave) CIMEIRetriever(aIMEI);
CleanupStack::PushL(self);
self->ConstructL();
CleanupStack::PopAndDestroy();
}
/////////////////////////////////////////////////////////////////////////
CIMEIRetriever::CIMEIRetriever(TDes& aIMEI)
: iTelephony(NULL), iIMEI(aIMEI), CActive(EPriorityStandard)
{
}
/////////////////////////////////////////////////////////////////////////
CIMEIRetriever::~CIMEIRetriever()
{
Cancel();
delete iTelephony;
}
/////////////////////////////////////////////////////////////////////////
void CIMEIRetriever::ConstructL()
{
iTelephony = CTelephony::NewL();
CActiveScheduler::Add(this);
CTelephony::TPhoneIdV1Pckg pckg(iPhoneId);
iTelephony->GetPhoneId(iStatus, pckg);
SetActive();
CActiveScheduler::Start();
}
/////////////////////////////////////////////////////////////////////////
void CIMEIRetriever::DoCancel()
{
iTelephony->CancelAsync(CTelephony::EGetPhoneIdCancel);
}
/////////////////////////////////////////////////////////////////////////
void CIMEIRetriever::RunL()
{
iIMEI = iPhoneId.iSerialNumber;
CActiveScheduler::Stop();
}
Forum posts: 47
when and where can I use this?
It is e.g. working perfectly in AppUI::HandleCommandL, but never returns in my AppUI::ConstructL() method.
Regards
lkz633
Forum posts: 39