How to find serial number of Android device?

后端 未结 17 2126
借酒劲吻你
借酒劲吻你 2020-11-22 14:07

I need to use a unique ID for an Android app and I thought the serial number for the device would be a good candidate. How do I retrieve the serial number of an Android devi

17条回答
  •  执念已碎
    2020-11-22 14:15

    Yes. It is a device hardware serial number and it is unique. So on api level 2.3 and above you can use android.os.Build.ANDROID_ID to get it. For below 2.3 API level use TelephonyManager.getDeviceID().

    you can read this http://android-developers.blogspot.in/2011/03/identifying-app-installations.html

提交回复
热议问题