What is the right way to get Unique Identifier of

2019-04-14 17:09发布

Currently i am using the following methods. I am not sure if this is the correct way to identify each unique phone (doesn't need to have same sim card). For android there is a imei phone

  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;
    }  

2条回答
放荡不羁爱自由
2楼-- · 2019-04-14 17:40

That seems to be the suggested way from the stuff that I have read to date.

查看更多
在下西门庆
3楼-- · 2019-04-14 17:42

Yes , it is the only way to get the unique device identifier ...

Downt forget to include the necessary value in WMAppManifest.xml . If it is not found , there will be an exception as described in the below URL...

http://www.ginktage.com/2011/05/how-to-get-the-uniqueid-of-the-windows-phone-device-using-c/

查看更多
登录 后发表回答