是否有唯一的Android设备ID?

泰勒

Android设备是否具有唯一ID,如果是,则使用Java访问它的简单方法是什么?

安东尼·弗洛尼

Settings.Secure#ANDROID_ID对于每个用户的64位十六进制字符串,返回唯一的Android ID

import android.provider.Settings.Secure;

private String android_id = Secure.getString(getContext().getContentResolver(),
                                                        Secure.ANDROID_ID);

另请阅读唯一标识符的最佳做法https//developer.android.com/training/articles/user-data-ids

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章