Android gets miei ismi SIM card serial number and other information

Source: Internet
Author: User

 

Because I have written one before, I feel that the writing is not detailed. Here is a supplement!

 

Code

  Telephonymanager telephonemanage  =  (Telephonymanager) getwindow ()
. Getcontext (). getsystemservice (context. telephony_service );
Try {
Edit1.settext ( " Miei: " + Telephonemanage. getdeviceid ()
+ " \ N simssn " + Telephonemanage. getsimserialnumber ()
+ " \ N imsi " + Telephonemanage. getsubscriberid ());
} Catch (Exception e ){
Edit1.settext (E. getmessage ());
}

 

 

If you want to obtain the mobile phone number identification, that is, the country's network number, you do not need to use the imsi number, but simply use this:

Telephonemanage. getsimoperator (); the identifier is obtained.

There is no problem in the 2g gsm network, but the test is not performed on the 3G card or the CDMA card! Unable to get results!

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.