Android的多用户支持的启示(新4.2)的服务器端数据模型(如android_id)多用户、服务器端、启示、数据模型

2023-09-12 06:27:26 作者:叹╰明月

谷歌刚刚发布的Andr​​oid 4.2,其中包括一台设备上的多个用户配置文件的支持:http://developer.android.com/about/versions/android-4.2.html#MultipleUsers.

Google has just released Android 4.2, which includes support for multiple user profiles on a single device: http://developer.android.com/about/versions/android-4.2.html#MultipleUsers.

谷歌表示,这将是透明的应用程序,但我认为这可能会对用于识别设备,用户和设备数据模型的影响。

Google says that this will be transparent to apps, but I think it could have an impact on the data model used to identify devices, users, and installations.

一个问题是使用android_id的。链接的网页上的建议显示上述识别装置通过的方法的其它然后android_id之一,但相信android_id非常广泛地用于此目的。

One issue is the use of android_id. The advice on the linked page above suggests identifying a device by one of the methods other then android_id, but I believe that android_id is very widely used for this purpose.

我的主要问题是 - ?是否每个用户配置文件有它自己的android_id,以及会有什么影响

安装新的操作系统时,一个新的android_id被生成或在硬复位完成 - 也许是一个新的将创建一个新的用户配置文件时产生的(这是问题#1)?我觉得可能不会,所以后来一个应用程序可以安装多次为同一android_id - 我认为这可能淤泥与一些应用程序的服务器端的数据模型。

A new android_id gets generated when a new OS is installed or when a hard reset is done - perhaps a new one will be generated when a new user profile is created (this is question #1)? I think probably not, so then an app could be installed multiple times for the same android_id - I think this could muck with the server-side data model for some apps.

无论哪种方式,取决于你如何识别设备,您现在可以找到一个特定的应用程序可以在单一设备上进行多次安装。

Either way, depending on how you identify a device, you could now find that a particular app can have multiple installations on a single device.

另一个问题是用户。 presumably每个配置文件可以拥有任意数量的谷歌帐户,但一个谷歌帐户必须与Play商店中的每个配置文件关联。我想这也可能是您的应用程序可以同时有多个设备使用相同的设备(由android_id)和相同的用户。我认为,一个共同使用的多个配置文件功能将是一个单一的用户有家庭和他们的电话的工作概况 - 通常使用不同的谷歌帐户,但在某些情况下,他们可能在每个配置文件相同的谷歌帐户(如使他们没有支付东西两次)。

Another issue is users. Presumably each profile can have any number of Google accounts, but a single Google account must be associated with the play store in each profile. I think it is also possible that your app could have multiple simultaneous installations with the same device (by android_id) AND the same user. I think that a common use of the multiple profiles feature will be for a single user to have home and work profiles on their phone - typically using different Google accounts, but in some case they could have the same Google account in each profile (e.g. so they don't have to pay for stuff twice).

旁注 Here是ANDROID_ID新的ARC平台(Android的在Chrome)上类似的讨论。请注意 - 在ARC的行为是不一样的在Android

Side Note Here is a similar discussion of ANDROID_ID on the new ARC platform (Android on Chrome). Take care - the behavior on ARC is not the same as on Android.

推荐答案

(没有人回答我的问题,但我现在有一个机会来测试4.2喽。)

(No one answered my question, but I've now had a chance to test with 4.2 myself.)

答案是:每个配置文件都有自己的android_id。

The answer is that each profile has its own android_id.

细想起来,这可能是很有道理的,将导致最少的问题。这应当引起大多数系统的设备不同的设备上看到的不同的配置文件 - 这不应该真正是一个问题。唯一的问题将是正确识别的设备系统,例如。基于WiFi或BT MAC地址或序列号或IMEI,然后预计多android_id的在该设备上的psented单个设备重新$ P $连续操作系统的安装。 (相反反常,这将是更安全的是错误的。)

Come to think of it, this probably makes the most sense and will cause the least problems. This should cause most systems to see the different profiles on a device as different devices - which shouldn't really be a problem. The only problem would be systems that correctly identified a device, eg. based on wifi or bt mac address, or serial number or IMEI, and then expected that multiple android_id's on that single device represented sequential OS installations on that device. (Rather perversely, it will be safer to be wrong.)