安卓:是否有一个相当于identifierForVendor iOS中?有一个、identifierForVendor、iOS

2023-09-08 09:53:12 作者:藏不住的寂寞

在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编号:结果Generating设备特有的序列号

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

请注意,Android的设计使您无法自动获得一个完整的设备ID。 Android的甚至修改了pre-现有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许可。然后,你知道用户的谷歌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.