任何人都可以告诉我Android中设备UDID的长度,因为我在Android中获得了UDID,它只有16个字符,但iPhone UDID长度为40.
我使用以下代码来检测ID:
id = android.provider.Settings.System.getString(super.getContentResolver(),
android.provider.Settings.Secure.ANDROID_ID);
Run Code Online (Sandbox Code Playgroud)
我有两个使用此代码的设备
String device_id = Secure.getString(getContentResolver(), Secure.ANDROID_ID);
Run Code Online (Sandbox Code Playgroud)
我__CODE__在两个设备上都有device_id 长度
Android ID是
因为至少在某些版本的Android中没有假装前导零.看一下类似问题的答案,为什么会这样:https: //stackoverflow.com/a/29890124/2066744
文档在此处将其指定为64位数字(表示为十六进制字符串):https: //developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID