Home > DeveloperSection > Forums > Windows Phone 8.1 Device Unique id
jacob rasel
jacob rasel

Total Post:88

Posted on    April-24-2015 1:30 AM

 Windows Phone Windows Phone 

 1 Reply(s)
 1652  View(s)
Rate this:
How to get the device unique id in Windows Phone 8.1?? The old way of using DeviceExtendedProperties.GetValue("DeviceUniqueId") not works for Windows Universal app.

Mayank Tripathi
Mayank Tripathi

Total Post:397

Posted on    April-24-2015 7:40 AM

This may help:

private string GetDeviceID()
            HardwareToken token = HardwareIdentification.GetPackageSpecificToken(null);
            IBuffer hardwareId = token.Id;
            HashAlgorithmProvider hasher = HashAlgorithmProvider.OpenAlgorithm("MD5");
            IBuffer hashed = hasher.HashData(hardwareId);
            string hashedString = CryptographicBuffer.EncodeToHexString(hashed);
            return hashedString;

Don't want to miss updates? Please click the below button!

Follow MindStick