开发者

Device SERIAL ID in android 1.6

开发者 https://www.devze.com 2023-02-22 09:11 出处:网络
how can i get seri开发者_JAVA技巧al number in API level 3?Depending on what you want to do there is several options :

how can i get seri开发者_JAVA技巧al number in API level 3?


Depending on what you want to do there is several options :

  • reading Settings.Secure.ANDROID_ID. "This is a 64-bit quantity that is generated and stored when the device first boots"

  • using TelephonyManager.getDeviceId() But it's not working on all devices.

More on the subject: http://android-developers.blogspot.com/2011/03/identifying-app-installations.html


TelephonyManager manager = (TelephonyManager) yourActivity.getSystemService(Context.TELEPHONY_SERVICE);
String uid = manager.getDeviceId();

This is working since API level 1.

0

精彩评论

暂无评论...
验证码 换一张
取 消