是否有等效于 iOS 的 identifierForVendor for android? [英] Is there an equivalent to iOS' identifierForVendor for android?

查看:45
本文介绍了是否有等效于 iOS 的 identifierForVendor for android?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 iOS 6 中,[UIDevice currentDevice].identifierForVendor 为来自单个供应商的所有应用提供唯一 ID.

In iOS 6, [UIDevice currentDevice].identifierForVendor provides a unique ID across all the apps from a single vendor.

有什么办法可以在 Android 中做同样的事情吗?

Is there any way to do the same thing in Android?

推荐答案

Android Id:
生成特定于设备的序列号

There is the Android Id:
Generating Device-Specific Serial Number

请注意,Android 的设计目的是让您无法自动获取完整的设备 ID.Android 甚至修改了 linux 的一个预先存在的部分使这成为可能.

Note that Android is designed so you can't automatically get a full device id. Android even modified a pre-existing part of linux that would have made this possible.

甚至比 Android id 更好:您的应用可以请求 AUTHENTICATE_ACCOUNTS 权限.然后您就知道用户的 Google id.这将在用户使用的所有应用程序和手机中通用.

Even better than Android id: your app can request the AUTHENTICATE_ACCOUNTS permission. Then you know the user's Google id. This will be common across all apps and phones the user uses.

这篇关于是否有等效于 iOS 的 identifierForVendor for android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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