Parzifal
Parzifal

Reputation: 1076

Windows Phone 8 find out IMEI / device name + manufacturer

I need to find out on which Windows phone device my app is running. Is there a reliable way to find out the IMEI in WP8? If not, is the DeviceName and DeviceManufacturer field reliably filled in by most devices? The documentation says those fields may be empty.

Upvotes: 0

Views: 4641

Answers (3)

Hex-Omega
Hex-Omega

Reputation: 503

You could use

//Device Name
Microsoft.Phone.Info.DeviceStatus.DeviceName

//Device Unique Identifier (not IMEI)
Convert.ToBase64String((byte[])Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId")))

//Device Manufacturer
Microsoft.Phone.Info.DeviceStatus.DeviceManufacturer

Hope this helps someone

Upvotes: 1

prabh.arora
prabh.arora

Reputation: 129

DeviceExtendedProperties.GetValue(“DeviceUniqueId”) works as stated on Windows Phone 7 but on Windows Phone 8, this API will return unique id common across all the apps for the same publisher on a wp8 device. But two different publisher's apps will have different device ID's.

Upvotes: 0

zirkelc
zirkelc

Reputation: 1713

This may work on Windows Phone 7. Maybe, it will also work on Windows Phone 8.

byte[] byteData = (byte[])DeviceExtendedProperties.GetValue(“DeviceUniqueId”);
string imei = System.Convert.ToBase64String(byteData);

Upvotes: 0

Related Questions