suyashyadav
suyashyadav

Reputation: 1

Windows Phone Device Unique Id

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.

Upvotes: 0

Views: 227

Answers (2)

Rowland Shaw
Rowland Shaw

Reputation: 38128

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

Upvotes: 1

Krunal Mevada
Krunal Mevada

Reputation: 1655

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

Upvotes: 0

Related Questions