Mobile device Number:

Source: Internet
Author: User

We talked about cell phone, card-related number data including Imsi,msisdn,iccid,imei

    /*** * Get phone IMEI number <br> * Remark:<br> * * <pre> * Call Sample code * </pre> * * @paramname *@return     * @exception[Exception type] [exception description] *@see[Class, Class # method, Class # member] *@since[Which version starts with this method]*/     PublicString Getimei () {Telephonymanager Telephonymanager=(Telephonymanager) Mapplicationcontext.getsystemservice (Context.telephony_service); if(NULL==Telephonymanager.getdeviceid ()) {            return""; }        returnTelephonymanager.getdeviceid (); }    /*** Take the SIM card serial number, that is iccid * *@return* * is a SIM card problem, mobile SIM before 07 cannot be read out, the new can be*/     PublicString Getsimserialnumber () {Telephonymanager Telephonymanager=(Telephonymanager) Mapplicationcontext.getsystemservice (Context.telephony_service); if(NULL==Telephonymanager.getsimserialnumber ()) {            return""; }        returnTelephonymanager.getsimserialnumber (); }    /*** Mobile User identification number * *@return     */     PublicString Getmsin () {return""; }    /*** android--Get the IMSI code of mobile phone, and judge it is China Mobile \ Unicom \ Chinese Telecom *@return     */     PublicString Getimsi () {Telephonymanager Telmanager=(Telephonymanager) Getsystemservice (Context.telephony_service); /**Get SIM card IMSI * SIM card Unique ID: IMSI International Mobile Subscriber Identification Number (imsi:international Mobile subscriber identification number) is a flag that distinguishes mobile users , * stored in a SIM card that can be used to differentiate valid information from a mobile user. IMSI is comprised of MCC, MNC, Msin, of which MCC is a mobile country number, consisting of 3 digits, * Uniquely identifies the country to which the mobile customer belongs, our country is a network ID of 460;MNC, consists of 2 digits, * used to identify mobile networks belonging to mobile customers,          National Mobile is 00, China Unicom is 01, the Chinese telecom for 03;msin Mobile Customer Identification Code, the use of equal length of 11 digits. * Uniquely identify domestic GSM mobile communication network to move customers. So to distinguish between mobile or unicom, just get the MNC field in the SIM card*/String IMSI=Telmanager.getsubscriberid (); if(imsi!=NULL){          if(Imsi.startswith ("46000") | | imsi.startswith ("46002")) {//because the mobile network number 46000 under the IMSI has run out, so virtual a 46002 number, 134/159th segment Use this number//China Mobile}Else if(Imsi.startswith ("46001")){          //China Unicom}Else if(Imsi.startswith ("46003")){          //China Telecom        }    }

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.