Is there a way that I can uniquely identify the windows phone device that my app is running on? Is there a windows phone device ID or something?
Try:
DeviceExtendedProperties.GetValue("DeviceUniqueId")
http://msdn.microsoft.com/en-us/library/ff941122(v=VS.92).aspx
object uniqueID;
if (Microsoft.Phone.Info.DeviceExtendedProperties.TryGetValue("DeviceUniqueId", out uniqueID)==true) {
byte[]bID=(byte[])uniqueID;
string deviceID=Convert.ToBase64String(bID); // There you go
}
Or you can use a globally unique identifier (GUID) in general http://msdn.microsoft.com/en-us/library/system.guid.aspx And save that ID on local storage.
deviceID = Guid.NewGuid();
IsolatedStorageSettings.ApplicationSettings["DeviceId"] = deviceID;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With