Is DeviceUniqueId a Windows Phone 8 app only for the app, not the device?

I use the DeviceUniqueId property of the DeviceUniqueId object to identify the device in my Windows Phone applications.

On Windows Phone 7, it worked perfectly, and the device identifier remained stable in all applications.

I ported my applications to Windows Phone 8 (focused on both WP7 and 8), and it still worked as usual.

However, I just developed an application that is only for WP8, and I noticed that DeviceUniqueId is different from my other application (it works on the same device).

Of course, I created several other test applications.

Here is an example on the same device (Nokia Lumia 820):

  • App1 (targets WP7 and 8), device ID: 422c3795ae12b92b18882bd93ea454b3
  • App2 (targets WP7 and 8), device ID: 422c3795ae12b92b18882bd93ea454b3
  • App3 (WP8 only), device ID: 19ff7b4c669b1cbeaf0e42ab1e6796ea
  • App4 (WP8 only), device ID: 240fe4501de11078313a63dde118d9ae

Is this intended? Is it possible to get a fixed device ID for applications only for WP8?

I cannot find official documentation of this behavior on MSDN.

Thanks.

+4
source share
2 answers

For Windows Phone 8, the definition in MSDN is:

For Windows Phone 8 applications running on Windows Phone 8 devices and later, the DeviceUniqueId value is unique for each device and for each application publisher. For Windows Phone 8 applications, DeviceUniqueId is functionally identical to the HostInformation.PublisherHostId property in the Windows runtime environment.

MSDN Reference - DeviceExtendedProperties Class

+1
source

According to the official MSDN document :

DeviceUniqueId . Unique hash for the device. This value will be constant in all applications and will not change if the phone is updated with a new version of the operating system. Applications should not use this to identify users, since the device identifier will remain unchanged even if ownership of the device is transferred.

On Windows Mobile 6.5, the hash was application specific . This does not apply to Windows Phone. However, as said, the identifier is publisher-specific. Try changing the publisher’s GUID in the manifest and you’ll see what happens.

+2
source

All Articles