Phone Identity Tutorial

This tutorial describes how to identify a phone using multimode phone sub-sessions. Phone identity information are the phone manufacturer, model, revision, serial number and subscriber ID.

The serial number is called the IMEI for GSM and ESN for non-GSM. The subscriber ID is a unique number called the IMSI.

  1. Check if the identity information can be obtained using RMobilePhone::GetIdentityCaps(). Capabilities are described by RMobilePhone::TMobilePhoneIdentityCaps.
  2. Retrieve the identity information using RMobilePhone::GetPhoneId(). Phone identity information is returned in a RMobilePhone::TMobilePhoneIdentityV1 object. This function does not return the subscriber ID.
  3. Retrieve the subscriber ID using anRMobilePhone::GetSubscriberId(). A subscriber ID is described in an RMobilePhone::TMobilePhoneSubscriberId buffer.

The function returns the information to identify the device.

Phone identity example

The following code checks if phone model information can be obtained, and if so, gets the model information. The code assumes iMobilePhone is an RMobilePhone object.


TUint32 identityCaps;

User::LeaveIfError(iMobilePhone.GetIdentityCaps(identityCaps));
TBuf<RMobilePhone::KPhoneModelIdSize> model;

if (identityCaps & RMobilePhone::KCapsGetModel)
    {
    TRequestStatus status;
    RMobilePhone::TMobilePhoneIdentityV1 mobilePhoneIdentity;
    iMobilePhone.GetPhoneId(status, mobilePhoneIdentity);
    User::WaitForRequest(status);
    User::LeaveIfError(status.Int());
    model = mobilePhoneIdentity.iModel;
    }