theblackdragon19 wrote:Hi all, Wooot... my first post. Anyway... I used the information in order to get the android_id in a hexadecimal value. But I have been testing my application on the HTC Tattoo, it returns a NULL when I am asking for a DEVICE_ID.
Is it because I am doing something wrong or, do I miss another permission or is there any other way to identify the ID of the phone?
Thanks in advance,
noobles wrote:How to uniquely identify an android device:
From the Android Reference page:
"public static final String ANDROID_ID
The Android ID (a unique 64-bit value) as a hex string. Identical to that obtained by calling GoogleLoginService.getAndroidId(); it is also placed here so you can get it without binding to a service."
It took me awhile to figure out how to use this since all the code on the net regarding this issue is only compatible with 1.1 and most of the things the code utilizes has since been deprecated in 1.5 of the SDK.
This is perfect for storing high scores for a game for each individual user without the need for user registration.
NOTE: The emulator will return a null value so if you try to use this value in the emulator environment your application will crash.
Users browsing this forum: Google [Bot] and 8 guests