How to generate unique id of Android device?

This question already has an answer here:

  • Is there a unique Android device ID? 40 answers

  • Look here https://stackoverflow.com/a/9186943/2007457

    "There's rather useful info here. It covers five different ID types:

    IMEI (only for Android devices with Phone use; needs android.permission.READ_PHONE_STATE)

    Pseudo-Unique ID (for all Android devices)

    Android ID (can be null, can change upon factory reset, can be altered on rooted phone)

    WLAN MAC Address string (needs android.permission.ACCESS_WIFI_STATE)

    BT MAC Address string (devices with Bluetooth, needs android.permission.BLUETOOTH)"


    i have created once class and use this in my app see this

    its create unique ID and generate MD5 message as string of unique device ID

    链接地址: http://www.djcxy.com/p/24648.html

    上一篇: Android独一无二的ID

    下一篇: 如何生成Android设备的唯一ID?