如何在API级别3中获取序列号?
根据您想要实现的功能,有几个选项:
读取Settings.Secure.ANDROID_ID。"这是一个64位的数字,在设备首次启动时生成和存储"
使用TelephonyManager.getDeviceId(),但并不适用于所有设备。
更多相关内容请参考: http://android-developers.blogspot.com/2011/03/identifying-app-installations.html
TelephonyManager manager = (TelephonyManager) yourActivity.getSystemService(Context.TELEPHONY_SERVICE);
String uid = manager.getDeviceId();
这个功能从API level 1开始就可以使用。