如何在Android 10中以编程方式获取设备的序列号?

huangapple 未分类评论54阅读模式
英文:

How to get the serial number of device in Android 10 programmatically?

问题

使用Build.getSerial()时抛出异常:

getSerial:用户10134不满足访问设备标识符的要求。

只有在Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q时才会发生这种情况。

有什么办法可以在Android 10中获取序列号吗?

英文:

When I am using Build.getSerial() it throws an exception

getSerial: The user 10134 does not meet the requirements to access device identifiers.

this happens only when Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q

Any help to get serial number in android 10?

huangapple
  • 本文由 发表于 2020年5月3日 23:33:02
  • 转载请务必保留本文链接:https://java.coder-hub.com/61577056.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定