是android.os.Build.SERIAL独特之处? [英] Is android.os.Build.SERIAL unique?

查看:4843
本文介绍了是android.os.Build.SERIAL独特之处?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用一个唯一的ID为适用于手机和平板电脑的Andr​​oid设备。 (IMEI不无SIM卡的设备正常工作和某个MAC地址返回NULL)

I would like to use a unique id for android device that works for phone and Tablet. (IMEI doesn't work with no SIM card device and sometime MAC Address return null)

我不知道是android.os.Build.SERIAL唯一的,或者不是。

I'm not sure is android.os.Build.SERIAL unique or not.

有谁知道这事吗?

谢谢, 问候。

推荐答案

是的,但要注意,它只是在API 9级增加,它可能不会对所有的设备present。要获得早期的平台一个唯一的ID,你需要阅读的东西,如MAC地址或IMEI。

Yes, but note that it was only added in API level 9, and it may not be present on all devices. To get a unique ID on earlier platforms, you'll need to read something like the MAC address or IMEI.

通常情况下,尝试阅读的所有的可能的标识和使用任何可用。 请参阅本文的指导

Generally, try reading all the possible IDs, and use whichever are available. See this article for guidance.

这篇关于是android.os.Build.SERIAL独特之处?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆