Getting the IMSI / IMEI (SIM/Device unique IDs)
<span style="border-collapse: separate; font-family: Verdana; font-size: 16px;">What you learn: You will learn how read out the IMSI (International Mobile Subscriber Identity) of the SIM-Card present in your mobile and the IMEI (International Mobile Equipment Identity). The IMSI identifies with the SIM, the IMEI with the device.Possible Scenario: You need a unique id for authentication/registration or license purposes of your Android-Activity http://www.anddev.org/images/smiles/icon_question.gif This two lines below provide you one SIM-unique ID, the IMSI and the device-unique ID the IMEI http://www.anddev.org/images/smiles/icon_exclaim.gif
Difficulty: 1 of 5 http://www.anddev.org/images/smiles/smile.png
http://www.anddev.org/images/smiles/icon_idea.gif Questions/Problems: Simply post below...
Description:
An International Mobile Subscriber Identity, or IMSI, is a unique number associated with all GSM and Universal Mobile Telecommunications System (UMTS) network mobile phone users. It is stored in the Subscriber Identity Module (SIM) inside the phone and is sent by the phone to the network. It is also used to acquire other details of the mobile in the Home Location Register (HLR)or as locally copied in the Visitor Location Register. In order toavoid the subscriber being identified and tracked by eavesdroppers onthe radio interface, the IMSI is sent as rarely as possible and a randomly generated TMSI is sent instead.
The International Mobile Equipment Identity or IMEI is a number unique to every GSM and UMTS mobile phone.It is usually found printed on the phone underneath the battery and can also be found by dialing the sequence *#06# into the phone.
Code: And this is how you read out the unique IMSI-ID / IMEI-ID within Android:
Java:<div style="font-family: monospace;">String myIMSI = android.os.SystemProperties.get(android.telephony.TelephonyProperties.PROPERTY_IMSI);
// within my emulator it returns: 310995000000000
String myIMEI = android.os.SystemProperties.get(android.telephony.TelephonyProperties.PROPERTY_IMEI);
// within my emulator it returns: 000000000000000
页:
[1]