Alternate Way of getting the Unique DeviceId in Windows Phone 8

Published on November 4, 2013 by abundantcode

Filed under Windows Phone

Last modified November 4, 2013

Print this page

rate 1 star rate 2 star rate 3 star rate 4 star rate 5 star
Your rating: none, Average: 0 (0 votes)

This article have been viewed 3750 times

The Windows Phone 8 SDK provides the PublisherHostId defined in the HostInformation class which can be used to get the Unique DeviceId in Windows Phone which is specific to the publisher.

Alternate Way of getting the Unique DeviceId in Windows Phone 8

Below is a sample code snippet demonstrating how to get the Unique DeviceId in Windows Phone 8 using PublicherHostId.

var UniqueID = Windows.Phone.System.Analytics.HostInformation.PublisherHostId;

MessageBox.Show(UniqueID);

Note that the access PublisherHostId requires ID_CAP_IDENTIY_DEVICE to be defined in the manifest.

Alternate Way of getting the Unique DeviceId in Windows Phone 8

 

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

2 Comments

  1. I’m getting following issue in code.I’ve explained in a question on stack overflow:

    http://stackoverflow.com/questions/28762808/getting-the-unique-deviceid-in-windows-phone-8-using-c-code

    February 27, 2015 - 4:19 pm – Reply

  2. Ali

    Is this possible to do in C++.

    February 27, 2015 - 5:00 pm – Reply

Leave a Comment


x

You might be Interested in these Posts

How to delete user account from command line in Windows 10 ?

You can delete a user account from command line in Windows 10 using the net user command and specify...

How to add new user account from command line in Windows 10 ?

You can add a new user account in Windows 10 using command prompt using the net user command and pas...

How to open display settings from command line in Windows 10 ?

The display properties can be found in the settings app in Windows 10 which lets the users to config...