I want to get the Device ID in Windows Phone 8.1.
The DeviceExtendedProperties or DeviceStatus are not available in WP8.1 (there is no Microsoft.Phone.Info
namespace). I've just found the EasClientDeviceInformation
class that I can't get the Id
from it. There is an exception in the Id
property:
And other properties are't unique.
There is another solution here but I don't know if it is safe or reliable to use: (?)
https://stackoverflow.com/a/23537207/3682369
Yes, you can use the
GetPackageSpecificToken()
. I have looked into it and haven't found any other way. Although MSDN says that theId
property contains some hardware info, it's actually an unique value for any device, even of the same model. So you can use it to identify the user's device.This is how I use it in my application. Feel free to use my code: