Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 495
IloveIniesta Avatar asked Dec 06 '25 13:12

IloveIniesta


2 Answers

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

like image 171
Pavan Avatar answered Dec 09 '25 19:12

Pavan


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.

like image 24
Kalanj Djordje Djordje Avatar answered Dec 09 '25 20:12

Kalanj Djordje Djordje