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
2

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Microsoft.Phone.Info.DeviceExtendedProperties is for Windows Phone 8 But We need for Windows phone 8.1 or UWP
Nightmare. Nightmare.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.