开发者

Device SERIAL NUMBER [duplicate]

This question already has answers here: Closed 11 years ago. 开发者_如何学Python

Possible Duplicate:

How to find serial number of Android device?

how can i get device serial number


There is an excellent post on the Android Developer's Blog discussing this.

It recommends against using TelephonyManager.getDeviceId() as it doesn't work on Android devices which aren't phones such as tablets, it requires the READ_PHONE_STATE permission and it doesn't work reliably on all phones.

Instead you could use one of the following:

  • Mac Address
  • Serial Number
  • ANDROID_ID

The post discusses the pros and cons of each and it's worth reading so you can work out which would be the best for your use.


from Telephony reading Settings.Secure.ANDROID_ID. "This is a 64-bit quantity that is generated and stored when the device first boots"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜