That should work on devices. It returned null on the emulator until
2.2 (or maybe 2.1, not sure when they made that cutover). But I have
definitely gotten it to work on 1.6 devices, though I haven't tried in
quite some time.
On Mon, Nov 15, 2010 at 6:52 PM, John Gaby wrote:
> I am using the following to obtain the ANDROID_ID for the device:
>
> Settings.Secure.getString(getContentResolver(),
> Settings.Secure.ANDROID_ID);
>
> Unfortunately this is returning null on 1.6 system (emulator and
> actual devices).
>
> I have also tried using
>
> Settings.Secure.ANDROID_ID;
>
> which is deprecated, but that does not work either.
>
> Does anyone know how to get a unique device id for version 1.6?
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy
Warescription: Three Android Books, Plus Updates, One Low Price!
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en