我知道在Windows Phone 7中,不可能获得IMSI和IMEI。如何在Windows Phone 8中获得IMSI和IMEI?
有没有办法让在Windows Phone 8中获得IMSI和IMEI?
我知道在Windows Phone 7中,不可能获得IMSI和IMEI。如何在Windows Phone 8中获得IMSI和IMEI?
有没有办法让在Windows Phone 8中获得IMSI和IMEI?
无法获取IMSI和IMEI号码,但是您可以使用设备唯一ID。
使用以下代码片段获取设备唯一ID。
命名空间是
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);
希望它可以帮助
如果您在应用程序中使用这个属性,你也可以使用此属性
Windows.Phone.System.Analytics.HostInformation.PublisherHostId
,你必须在指定应用ID_CAP_IDENTITY_DEVICE能力表现。
这个ID被认为是一个独特的哈希而不是每个设备的ID。它似乎不匹配从Windows电话通过EAS交换服务器的ID。事实上,我们看到当应用程序执行与Exchange服务器的同步时,它会发送所有详细信息,如IMEI号码和正确的设备ID。只有从公司的应用程序,我们无法检索这些细节。
您可以通过拨打*#06#得到您的IMEI这适用于几乎所有的手机
你可以使用DeviceExtendedProperties.GetValue()属性设备的唯一ID。 使用下面的代码
byte[] myDeviceID = (byte[])Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId");
string DeviceIDAsString = Convert.ToBase64String(myDeviceID);
[查看IMEI没有在WP7?](http://stackoverflow.com/questions/6965267/find-imei-no-in-wp7) – 2013-05-06 07:28:02
@AmigableClarkKant也许可能重复它是可能的wp8 – IloveIniesta 2013-05-07 02:03:47