0

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

  • windows-phone-8.1
  • uwp
  • xamarin.uwp
  • c#
  • visual-studio-2015
Nirav Joshi
  • 2,884
  • 1
  • 21
  • 43

1 Answers1

0

This looks like what you're looking for...

[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);
        }
    }
}

This requires the permission ID_CAP_IDENTITY_DEVICE.

bbsimonbb
  • 24,062
  • 11
  • 66
  • 99