|
  
- UID
- 2
- 帖子
- 1793
- 精华
- 5
- 积分
- 7831
- e望
- 162 点
- e币
- 2208 元
- e脉
- 30 条
- 来自
- 深圳,中国
- 在线时间
- 3165 小时
  
|
3#
发表于 2009-10-16 15:40
| 只看该作者
再来个不需要权限的:
http://iceskysl.1sters.com/?action=show&id=455
In some case,you may want do get Uniquely Identifying for a 'real' android phone,and you can do it like this:
In Android.Provider.Settings.System we have some interesting values that could be of use, one specifically is “Android_ID”. From the documentation it is the following;
String ANDROID_ID The Android ID (a unique 64-bit value) as a hex string. “android_id”- import Android.Provider.Settings.System;
- ...
- String Android_ID = System.getString(this.getContentResolver(), System.ANDROID_ID);
复制代码 Also, note that in an emulator this will return “null”, though a real device will return an actual value. The nice thing about this tid-bit of code is that you are not required any special permissions to call it, since it’s essentially a passive call to get information. No write access is (obviously) required. |
|