views:

61

answers:

3

I’m writing a Windows Phone 7 app and am looking for a way to get a unique and unchanging device Id that I can use to identify the device and therefore the user (since Microsoft doesn’t give you access to the users Windows Live Id). Anyone know if this is going to be possible? Especially interested to find out if the id will be a) unique and b) unchanging.

Thanks,

A: 

I'm not sure whether the API provides access to any phone-specific unique IDs as I don't have API documentation in front of me. I imagine that an app could generate it's own UID and store it on the device at install time. As this value would be created by an application, it may be deleted when a device is factory reset or the app is removed.

Another avenue to investigate is whether you can get programmatic access to the IMEI (International Mobile Equipment Identifier) which should be unique per-device and non-changing. An IMEI is part of the GSM standard, it may also be supported by WCDMA but I can't confirm this.

Unfortunately I can't provide any code samples to help you as Windows Phone is not an API that I have specific knowlege of

Crippledsmurf
+2  A: 

http://msdn.microsoft.com/en-us/library/ff941122%28v=VS.92%29.aspx

DeviceUniqueId Poperty. One Windows Live ID can be associate with 5 devices, some can sell the phone etc. If you really want to know If John XYZ has logged in you need to implement it on your own way.

I can imagine an app that start page is a web broswer control and user log into (you can use Windows Live ID service), you get the info who is he.

lukas
+2  A: 

Hi Will,

There is an anonymous live ID (ANID) rather than having direct access to the windows live ID. There is also a unique device ID. Further detail and code samples here for your reference.

UserExtendedProperties.GetValue Method (Microsoft.Phone.Info)

Device Information for Windows Phone

Mick N
This seems a more correct way to identify a user, rather than looking at identifying the device.
Programming Hero
Looking at those links the Microsoft folks specifically say "Applications should not use this to identify users because the device ID will remain unchanged even if ownership of the device is transferred.". So looks like i'm going to have to find another way to get the user's id.
will
Hi Will, That is true for the Device ID, but you should also look at the ANID (Anonymous User ID) in the first link.
Mick N