Question

I want to get the IMEI number of my Windows Phone in my application. How can I programatically access it? If IMEI won't get in my application, then how to access MAC address of my phone. In my application, the administrator can block some devices from accessing the server resources using a unique ID. So I want to get the UniqueID programatically and manually from phone.

Now I can access a DeviceUniqueID from my app but don't show it in the phone. I can access FirmwareVersion and HardwareVersion both programatically and manually. They are shown in phone as firmware revision number and hardware revision number. Are they unique?

Was it helpful?

Solution

You can get a device id via:

DeviceExtendedProperties.GetValue("DeviceUniqueId")

(In the Microsoft.Phone.Info namespace)

Bear in mind the warnign from the documentation:

A unique hash for the device. This value will be constant across all applications and will not change if the phone is updated with a new version of the operating system. Applications should not use this to identify users because the device ID will remain unchanged even if ownership of the device is transferred.

You will also need to declare in your manifest that you require capability ID_CAP_IDENTITY_DEVICE

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top