2011年9月3日 星期六

[Android] ANDROID_ID

* Definition
- A 64-bit number (as a hex string) that is randomly generated on the device's first boot and should remain constant for the lifetime of the device. (The value may change if a factory reset is performed on the device.)
- 第一次啟動 Android 設備時隨機生成的64位數(以十六進制字符串表示), "應在"保持設備一生不變的. (當設備執行重置出廠值時, 該值可能改變.)

* from level 3

* How to get?
- Settings.Secure.getString(getContentResolver(), Settings.Secure.ANDROID_ID);
- but you will get "null" on emulator.

* Is it unique for each Device?


Update on 20111106
  • 透過設定中的選項恢復原廠設定後,ANDROID_ID 仍是相同。
  • 若是更新系統,是否仍會相同?
  • 重新刷ROM的話,是否仍會相同?


* Reference
- Settings.Secure | Android Developers
- 獲取 Android 設備的 ID,Settings.Secure.ANDROID_ID

沒有留言:

張貼留言