3

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?

2

5 Answers 5

5

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

1

You can also use this property

Windows.Phone.System.Analytics.HostInformation.PublisherHostId

If you use this property in your app, you must specify ID_CAP_IDENTITY_DEVICE capability in the app manifest.

0

This ID is supposedly a unique Hash not a device id per say. It does not seem to match with the ID that is sent from Windows phone to exchange server over EAS. In fact we see that when application performs a Sync with Exchange server, it sends all the details like IMEI number and correct device id. It is only from company apps that we are not able to retrieve these details.

0

You can get your imei by dialing *#06# this works on virtually every phone

0

You can get Device Unique Id using DeviceExtendedProperties.GetValue() property. Use the following code

byte[] myDeviceID = (byte[])Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId");
            string DeviceIDAsString = Convert.ToBase64String(myDeviceID);

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.