WINDOWS PHONE 8.1 DEVICE UNIQUE ID

jacob rasel

Total Post:88

Points:616
Posted by  jacob rasel
 2428  View(s)
Ratings:
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.
  1. Mayank Tripathi

    Post:397

    Points:3117
    Re: Windows Phone 8.1 Device Unique id

    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;
            }

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!