【问题标题】:Is there an equivalent to iOS' identifierForVendor for android?是否有相当于 iOS 的 identifierForVendor for android?
【发布时间】:2013-01-17 10:54:51
【问题描述】:

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

有没有办法在 Android 中做同样的事情?

【问题讨论】:

    标签: android uniqueidentifier


    【解决方案1】:

    有Android ID:
    Generating Device-Specific Serial Number

    请注意,Android 的设计使您无法自动获取完整的设备 ID。 Android 甚至 modified a pre-existing part of linux 都可以做到这一点。

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

    【讨论】:

    • 这些 ID 都不是特定于设备的,但 ANDROID_ID 是最佳选择。我喜欢 iOS 实现 identifierForVendor 的方式,因为这是开发人员非常常见的用例,它不识别设备,只识别供应商-设备组合。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-03
    相关资源
    最近更新 更多