Get Unique Device ID (UDID) under Windows Phone 8

后端 未结 9 730
抹茶落季
抹茶落季 2020-12-04 15:23

Is there any unique device ID (UDID) or any similar ID I can read out on Windows Phone 8 (WP8) that doesn\'t change with hardware changes, app-reinstallation etc.?

I

9条回答
  •  独厮守ぢ
    2020-12-04 15:53

    I used this:

        private static String getDeviceId()
            {
                byte[] id = (byte[])Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId");
                return BitConverter.ToString(id).Replace("-", string.Empty);
            }
    

    But the key is to Check the ID_CAP_IDENTITY_DEVICE in WMAppManifest, or else it throws error.

提交回复
热议问题