Search code examples
windows-phone-8

How can I get IMSI and IMEI in Windows Phone 8?


I know in Windows Phone 7, it is impossible to get the IMSI and IMEI.

Is there a way to get IMSI and IMEI in Windows Phone 8?


Solution

  • There is no way to get IMSI and IMEI number, however you can use the device unique Id.

    Use the following code snippet to get the device unique id.

    Namespace is

    using Microsoft.Phone.Info;
    
    object uniqueId;
    var hexString = string.Empty;
    if (DeviceExtendedProperties.TryGetValue("DeviceUniqueId", out uniqueId))
         hexString = BitConverter.ToString((byte[])uniqueId).Replace("-", string.Empty);
            MessageBox.Show("myDeviceID:" + hexString);
    

    Hope it helps