Android Phone uniquely identifies IMSI

Source: Internet
Author: User

Android apps are becoming more and more, and the server is becoming more and more strict with the user rights management used by the app, such as using Request_token tokens to control

Server-based APIs, and the complexity of server management users is also high. Used in the development of the app is the phone's IMEI as the only indication of the machine

Code, but when the brush machine, System Restore factory settings in these 2 cases, the IMEI of the phone will change, so sometimes back to appear before the binding IMEI in the service

Database corresponding to the user mobile device, when the user brushes the machine, restore factory settings at this time the user's phone IMEI is changed, when the user logged in, the submitted

IMEI and Server database IMEI is not the same, but came to the conclusion: only when the user does not brush the machine, do not restore the factory settings, the phone's

The IMEI is the same. Later found a relatively unique mobile phone information code----IMSI.

1, Imsi of the Chinese analytic definition:
International Mobile Subscriber ID (IMSI) International Mobile subscriber Identity

An internationally assigned number that uniquely identifies a mobile user.

2, technical application on the analysis:
Technically speaking, IMSI can completely solve the problem of international roaming. But since North America still has a large number of amps systems using min numbers, and North America

The MDN and min use the same number, the system has been unable to change, so the current international roaming temporarily or Min-based. With the O and 1, the Min capital

Source is called IRM (International Roaming MIN), by Ifast (International Forum on ANSI-41 standards Technology)

One Management. Currently, the IRM resources applied for Unicom begin with 09. As you can see, the Min resources for international roaming will soon be depleted as users grow, and the global

It is imperative to use IMSI to identify users.
IMSI a total of 15 bits, the structure is as follows:
Mcc+mnc+min
Mcc:mobile Country Code, mobile country Code, a total of 3 people, China is 460;
Mnc:mobile Network Code, mobile code, a total of 2, Unicom CDMA system using 03, a typical imsi number of 460030912121001;
Min has a total of 10 bits, which are structured as follows:
09+m0m1m2m3+abcd
There is a correspondence between the M0M1M2M3 and the h0h1h2h3 in the MDN number, and the ABCD four bits are allocated freely.

It can be seen that imsi in the min number before the MCC, can distinguish each user from the country, so can achieve international roaming. In the same

In a country, if there are multiple CDMA operators, the MNC can be used to differentiate.


3, the development of commonly used mobile phone information:

/***
* Get information on your phone
*/
public void Fetch_status () {
Telephonymanager TM = (Telephonymanager)
This.getsystemservice (context.telephony_service);//

String str = "";
str + = "DeviceId (IMEI) =" + Tm.getdeviceid () + "\ n";
str + = "Devicesoftwareversion =" + tm.getdevicesoftwareversion () + "\ n";
str + = "Line1number =" + tm.getline1number () + "\ n";
str + = "Networkcountryiso =" + tm.getnetworkcountryiso () + "\ n";
str + = "Networkoperator =" + tm.getnetworkoperator () + "\ n";
str + = "Networkoperatorname =" + tm.getnetworkoperatorname () + "\ n";
str + = "Networktype =" + tm.getnetworktype () + "\ n";
str + = "Phonetype =" + tm.getphonetype () + "\ n";
str + = "Simcountryiso =" + tm.getsimcountryiso () + "\ n";
str + = "Simoperator =" + tm.getsimoperator () + "\ n";
str + = "Simoperatorname =" + tm.getsimoperatorname () + "\ n";
str + = "Simserialnumber =" + tm.getsimserialnumber () + "\ n";
str + = "Simstate =" + tm.getsimstate () + "\ n";
str + = "SubscriberId (IMSI) =" + Tm.getsubscriberid () + "\ n";
str + = "Voicemailnumber =" + tm.getvoicemailnumber () + "\ n";
TextView sys = (TextView) Findviewbyid (R.id.sys);
Sys.settext (str);
}

Android phone uniquely identifies IMSI

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.