开发者

Device SERIAL ID in android 1.6

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜