通过DeviceUtils获取设备信息:
val string = StringBuffer()
string.append("\n" + DeviceUtils.getAndroidID())
string.append("\n" + DeviceUtils.getSDKVersionCode())
string.append("\n" + DeviceUtils.getSDKVersionName())
string.append("\n" + DeviceUtils.getManufacturer())
string.append("\n" + DeviceUtils.getModel())
Log.d("caowj", "$string")
输出的日志:
37c80820ac4c7abf
30
11
vivo
V2164KA