Is there a unique device identifier (UDID) or any similar identifier that I can read on Windows Phone 8 (WP8) that does not change with hardware changes, reinstalling applications, etc.?
In older versions of Windows Phone there were such IDs: WP7: Device Status for Windows Phone
WP7.1: DeviceStatus Class
But with SDK 8.0 they no longer work.
Why I ask: The idea is that the user receives free credits from the first launch of the application, and I want to avoid the fact that the user simply reinstalls the application to receive new free credits. Registering by email or phone number can solve this problem, but if I can, I donβt want users to worry when they first start with registration.
---///--- Decision ----------
I can confirm that DeviceExtendedProperties.GetValue ("DeviceUniqueId") still works in WP 8.0. I was a little embarrassed when I read the following text:
In Windows Phone OS 7.0, this class was used to request device-specific properties. On Windows Phone 7.1, most of the properties in DeviceExtendedProperties are deprecated, and the new DeviceStatus class should be used instead. However, if necessary, you can still use any of the properties listed below that are not outdated.
MSDN: class DeviceExtendedProperties
I can run the following code, uninstall the application and reinstall it and get the same ID:
byte[] myDeviceID = (byte[])Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId"); string DeviceIDAsString = Convert.ToBase64String(myDeviceID); MessageBox.Show(DeviceIDAsString);
c # windows-phone-7 windows-phone-8
flexo Dec 20 2018-12-12T00: 00Z
source share