目前我正在使用以下方法。我不确定这是否是识别每个独特手机的正确方法(不需要使用相同的SIM卡)。对于Android有一个imei手机
public static String GetDeviceUniqueID()
{
object DeviceUniqueID;
byte[] DeviceIDbyte = null;
if (DeviceExtendedProperties.TryGetValue("DeviceUniqueId", out DeviceUniqueID))
DeviceIDbyte = (byte[])DeviceUniqueID;
string DeviceID = Convert.ToBase64String(DeviceIDbyte);
return DeviceID;
}
答案 0 :(得分:3)
是的,这是获取唯一设备标识符的唯一方法......
Downt忘记在WMAppManifest.xml中包含必要的值。如果找不到,则会出现以下URL中描述的异常...
http://www.ginktage.com/2011/05/how-to-get-the-uniqueid-of-the-windows-phone-device-using-c/
答案 1 :(得分:2)
这似乎是我迄今为止阅读的内容的建议方式。