Android get Serial Number

后端 未结 6 2116
予麋鹿
予麋鹿 2020-12-11 17:26

I am trying to get the device serial number programmatically. I have used the following line:

Build.SERIAL

Which returns something like :

6条回答
  •  一向
    一向 (楼主)
    2020-12-11 17:38

    I am trying to get the device serial number programmatically

    This feature is broken on Android for ages. Some devices return null, some return the same ID for all the devices etc. If your app is using Google Play Services, use InstanceId instead, or see this, but ancient now, but still valid, blog post.

提交回复
热议问题