Android imsi and IMEI

Source: Internet
Author: User

Description:
Imsi is a unique number that identifies the only user in the GSM and UMTS networks. It is stored in the SIM card of the mobile phone and will be sent to the network through the mobile phone.

IMEI is also a unique number that identifies the only mobile phone in the GSM and UMTS networks. it is usually printed under the cell phone, dial * #06 # To See It.

Code: Here is the only way you read IMSI-ID/IMEI-ID in Android.
Java:
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

 

Not all mobile phone numbers can be obtained. Only some of them can be obtained. This is because the mobile operator did not write the data of the mobile phone number into the SIM card.

The SIM card only has a unique ID for the network and device to identify, that is, the imsi number. The mobile phone signal can also be said to be transmitted through this number in the network, not the mobile phone number.

Imagine if your SIM is lost, will a new one be replaced? -No

It is because the imsi number corresponding to your mobile phone number is changed to the imsi number of the new SIM card in the mobile operator.

Why can I display some mobile phone numbers?

This is like a variable. When a mobile operator assigns a value to it, it naturally has a value. Null if no value is assigned.

 

/**
* Get some cell phone Logos
*
* @ Param C
* @ Return string indicates the mobile phone type.
*/
Public String fetch_status (context c ){
Telephonymanager TM = (telephonymanager) c
. Getsystemservice (context. telephony_service );//
String STR = "";
String imsi = TM. getsubscriberid ();
STR + = "DeviceID (IMEI) =" + TM. getdeviceid () + "/N ";

STR + = "devicesoftwareversion =" + TM. getdevicesoftwareversion ()
+ "/N ";
STR + = "line1number =" + TM. getline1number () + "/N ";
Return STR;
}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.