【问题标题】:Is there any way to fetch the IMEI Number of the Windows Phone device Using C#有什么方法可以使用 C# 获取 Windows Phone 设备的 IMEI 号码
【发布时间】:2017-12-16 23:08:36
【问题描述】:

有什么方法可以使用C#获取Windows Phone设备的IMEI Number

  • windows-phone-8.1
  • uwp
  • xamarin.uwp
  • c#
  • visual-studio-2015

【问题讨论】:

标签: c# visual-studio-2015 uwp windows-phone-8.1 xamarin.uwp


【解决方案1】:

This 看起来像您要找的...

[assembly: Xamarin.Forms.Dependency(typeof(UniqueIdWinPhone))]
namespace UniqueId.WinPhone
{
    public class UniqueIdWinPhone : IDevice
    {
        public string GetIdentifier()
        {
            byte[] myDeviceId = (byte[])Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId");
            return Convert.ToBase64String(myDeviceId);
        }
    }
}

这需要ID_CAP_IDENTITY_DEVICE的权限。

【讨论】:

  • Microsoft.Phone.Info.DeviceExtendedProperties 适用于 Windows Phone 8 但我们需要适用于 Windows phone 8.1 或 UWP
  • 噩梦。噩梦。
猜你喜欢
  • 2011-11-17
  • 2014-01-21
  • 2018-07-11
  • 2016-08-07
  • 2019-03-21
  • 1970-01-01
  • 2013-01-11
  • 2010-10-15
  • 2018-11-15
相关资源
最近更新 更多