How about using the WIFI MAC address in cases where the ANDROID_ID is null? I believe it should be unique for each device:
WifiManager manager = (WifiManager) getSystemService (Context.WIFI_SERVICE); WifiInfo wifiInfo = manager.getConnectionInfo(); String MACAddress = wifiInfo.getMacAddress(); This seems to pull back a MAC address even if WIFI is turned off. -Gregg On Feb 1, 10:54 am, Rampanda <khaeonga...@gmail.com> wrote: > Hi, > > having the exact same problem on a Droid 2.0.1 and HTC Hero 1.5. : > > String androidID = Secure.getString(this.getContextResolver(), > android.provider.Settings.Secure.ANDROID_ID); > Toast.makeText(this, "ANDROID_ID: " + androidID, > Toast.LENGTH_LONG).show(); > > consistently returns null on the devices and differences in OS and > device seem to indicate some sort of problem with the compiled code. > > Not sure what is causing this, could be that the app erroneously > believes it is running on an emulator or for some other reason is > unable to retrieve the setting. > > No uncaught exceptions or other error message are printed when making > these calls which help. > > For our application to work we need to be 100% sure we have a unique > ID across all OS versions and device manufacturers, which is exactly > what androidID is for. We're using IMEI and some key voodoo to sort of > make it unique, but would prefer androidID to work. Also, it not > working may be caused by something else that is also breaking other > functionality. > > Haven't found the cause yet, but as soon as something falls into place > I'll post it here. In the meantime, what is the name of the android > apps you're using? Would like to test with the exact same ones you're > testing on. > > 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