Android app how to achieve registration-free, direct access to the phone unique identity to sign in

Source: Internet
Author: User
Tags unique id

============ Problem Description ============


Title is the app I designed to log in when it is directly login and do not need to register, see Online said to get the Android phone on the physical unique identification code, see is said through the CPU number and MAC address.
Want to know how to get the code is the best

============ Solution 1============


All know the online search, why not by the way to check the code it?
http://cache.baiducontent.com/c?m= 9d78d513d9901df918b0cf281a16a6375b1394247c89df4f3992d15f9217465c0223a6ac2755105595986b6776fe1403f7a9626f370123b799cc9549d cbd92292b9f27432a5ad91f&p=9b759a46d0c510fe0be296245705cd&newp= Aa78c54ad5c547e02ab6c7710f448b231610db2151d6d51430a6c8&user=baidu&fm=sc&query=android+cpu&qid= 905f1af40002baf4&p1=1

============ Solution 2============


/**     *  get the phone number      *     *   @param  context     *     *  @return       */    public static string getlocalphonenumber ( Context context)     {        String  Line1number = gettelephonymanager (context). Getline1number ();         return line1Number == null ?  ""  : line1Number;     }    /**     *  Get device model (NEXUS5)       *     *  @return      */     public static string getdevicemodel ()     {         return build.model;    }    /**     *  Get Phone Communication Management (you can get your phone number from this object)      *     *  @param   context     *     *  @return       */    public static telephonymanager gettelephonymanager (Context  context)     {        return  ( Telephonymanager)  context.getsystemservice (context.telephony_service);    }/**      *  get unique id     *     * @ for your device param context     *     *  @return       */    public static string getandroidid (Context  Context)     {    &Nbsp;   return settings.secure.getstring (Context.getcontentresolver (),  Settings.Secure.ANDROID_ID);     }

How Android apps do not register, get a unique ID to sign in directly

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.