簡體   English   中英

有沒有辦法使用C#來獲取Windows Phone設備的IMEI號

[英]Is there any way to fetch the IMEI Number of the Windows Phone device Using C#

有沒有辦法使用C#來獲取Windows Phone設備的IMEI Number

  • Windows的手機,8.1
  • UWP
  • xamarin.uwp
  • C#
  • 視覺工作室2015年

看起來像您要找的東西...

[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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM