简体   繁体   English

Android:所有设备上同一用户的唯一ID

[英]Android: unique id for the same user on all devices

Is there an unique value to identify the same Android user on different devices? 在不同设备上标识同一Android用户是否有唯一的价值?

ANDROID_ID is a value which identifies the device ANDROID_ID是用于标识设备的值

but what about a value to identify the user? 但是用于标识用户的值呢?

if you request the GET_ACCOUNTS permission in your app, you are able to access the email address of the user, but that requires your app to ask the user to grant such permission, which is not very pleasant 如果您在应用程序中请求GET_ACCOUNTS权限,则可以访问用户的电子邮件地址,但这需要您的应用程序要求用户授予此类权限,这不是很愉快

Anyone is aware of an unique id that an user keeps on all devices where he uses the same Google account? 有谁知道用户在使用相同Google帐户的所有设备上保留的唯一ID?

You could use the AccountPicker to get the user account without using additional permission. 您可以使用AccountPicker获得用户帐户,而无需使用其他权限。 In this way you have to show to the user a dialog to select the account. 这样,您必须向用户显示一个对话框以选择帐户。 Here the docs 这里的文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM