Windows Phone Device Unique Id

折月煮酒 提交于 2019-12-12 04:03:18

问题


I have a windows phone 7 app which is live in store which is using DeviceExtendedProperties.GetValue("DeviceUniqueId") to fetch id and I am updating it in store with new windows phone 8 app and using same method.

In both cases I am getting different id? I want the id to be same in both the cases.


回答1:


Per this blog post:

For Windows Phone 8 apps running on Windows Phone 8 devices and later, the DeviceUniqueId value is unique per device and per app publisher, which means that two apps published by different windows phone store account won’t get the same “device unique id”.

As there is a compatibility issue for Windows Phone 7.x apps, it may be the case that the phone essentially has an id for 7.x apps, and defers to a different logic to return a per publisher version for 8.x apps




回答2:


Check this one:

byte[] id = (byte[])Microsoft.Phone.Info.
                DeviceExtendedProperties.GetValue("DeviceUniqueId");
string deviceID = Convert.ToBase64String(id);

Checked WMAppManifest.xml -> Capabilities tab -> switch on ID_CAP_IDENTITY_DEVICE



来源:https://stackoverflow.com/questions/36004003/windows-phone-device-unique-id

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