How to get IMEI on 7710
Article Metadata
We could use PlpVariant to get imei in S60 2nd Edition development.
#if !defined(__WINS__) && !defined( __WINSCW__ )
PlpVariant::GetMachineIdL( iImei );
#else
iImei.Copy( KDefaultIMEI );
#endif
But it cannot work on 7710. We should use Etel3rdParty to read IMEI.
/* Declare the client class */
class CClientApp : public CActive
{
public:
// Construction
void ConstructL();
// Destruction
~CClientApp();
// Issue request: retrieve IMEI
void GetIMEI();
// Cancel request
void DoCancel();
// Service completed request
void RunL();
private:
CTelephony* iTelephony; // telephony object we own
CTelephony::TPhoneIdV1 iV1;
CTelephony::TPhoneIdV1Pckg* iPkg;
};
/* Define the client class */
void CClientApp::ConstructL()
{
iPkg = new (ELeave) CTelephony::TPhoneIdV1Pckg(iV1);
iTelephony = CTelephony::NewL();
CActiveScheduler::Add(this);
}
CClientApp::~CClientApp()
{
Cancel(); // if any request outstanding, calls DoCancel() to cleanup
delete iTelephony;
delete iPkg;
}
void CClientApp::GetIMEI()
{
iTelephony->GetPhoneId(iStatus,*iPkg );
SetActive();
CActiveScheduler::Start();
}
void CClientApp::RunL()
{
TBuf<50> retrievedIMEI;
if ( (iStatus == KErrNone) )
{
retrievedIMEI = (*iPkg)().iSerialNumber;
}
CActiveScheduler::Stop();
}
void CClientApp::DoCancel()
{
Cancel();
}


08 Sep
2009
This article had explaine about the getting of IMEI no it means (International Mobile Equipment Identity number) is a unique number associated with every GSM and UMTS mobile phone and can help you find your stolen cell phone easily. Save your IMEI number today.We could use PlpVariant to get imei in S60 2nd Edition development this example help the beginners to retrive imei no .
Hmm was confused about the above comment as the article is about Nokia 7710 which according to http://www.developer.nokia.com/Devices/Device_specifications/7710/ is a Symbian OS v7.0s device then how come this article is talking about CTelephony which only available after v8.1a. Or am i missing some thing .
In my understanding Read IMEI in S60 2nd edition - PlpVariant API is way to go. --skumar_rao 04:42, 9 September 2009 (UTC)