Ok, I tried it out on an HTC Tatoo also running 1.6, and it returns a value, so it does happen on only some devices. However, I really need a unique id that will work on every device. Do you have any suggestions about what I could use in the case where the ANDROID_ID is null?
Thanks. On Nov 15, 4:17 pm, John Gaby <jg...@gabysoft.com> wrote: > I just double checked it on a Motorola Devour running 1.6 and it is > definitely returning a null. I will see if I can find another 1.6 > device and check to see if it is just this particular one. Given that > this call CAN return null, is there some other way to get a unique id > for the device? > > Thanks. > > On Nov 15, 4:06 pm, Mark Murphy <mmur...@commonsware.com> wrote: > > > 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 <jg...@gabysoft.com> 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/commonsguyhttp://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