Implications of Android multiple user support (new in 4.2) for server side data model (e.g. android_id)

懵懂的女人 提交于 2019-11-27 08:13:07

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

The answer is that each profile has its own android_id.

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.)

Yes, each user profile has its own ANDROID_ID. This is now documented here:

Note: When a device has multiple users (available on certain devices running Android 4.2 or higher), each user appears as a completely separate device, so the ANDROID_ID value is unique to each user.

Beware though that manufacturers have been known to botch their implementation of ANDROID_ID. For example, the Motorola Droid2 returned the same ANDROID_ID value for every device. For that reason, relying on the ANDROID_ID to uniquely identify user profiles or devices may be unreliable.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!