× ABOUT DOWNLOADS PROJECTS WORK
    cyberpunk.sh
Profile photo

PREMCHAND CHAKKUNGAL

SENIOR SOFTWARE ENGINEER

    BACK HOW TO GET UNIQUE DEVICE ID IN WINDOWS PHONE USING C#

Most of the app developers require a way to uniquely identify each mobile device. Given below is a simple function which will give you the device id in the string format.


public string GetDeviceId()  
 {  
    byte[] myDeviceID=(byte[])Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId");  
    return Convert.ToBase64String(myDeviceID);  
 }