Android: Flush DNS


Question

We recently released an android application that pulls information from an external server. Last week we moved from shared hosting to a dedicated server, that went smoothly up until we started getting complaints that users were getting server not found errors. We checked on our android-based phones (Droid) and everything worked fine. The vast majority of users are fine, there seems to be a small percentage of t-mobile users running android o/s 1.5 (g1, mytouch 3g) that seem to be having trouble. We believe these are all previous users of the application.

Anyway, we've been trying to find a fix (similar to ipconfig /flushdns) but have been unable to do so. Has anyone had experience with something similar to this? Thanks.

1
33
1/20/2010 1:51:00 PM

Accepted Answer

You have a few options:

  • Release an update for your app that uses a different hostname that isn't in anyone's cache.
  • Same thing, but using the IP address of your server
  • Have your users go into settings -> applications -> Network Location -> Clear data.

You may want to check that last step because i don't know for a fact that this is the appropriate service. I can't really test that right now. Good luck!

20
1/20/2010 2:06:47 PM

copied from: https://android.stackexchange.com/questions/12962/flush-clear-dns-cache

Addresses are cached for 600 seconds (10 minutes) by default. Failed lookups are cached for 10 seconds. From everything I've seen, there's nothing built in to flush the cache. This is apparently a reported bug http://code.google.com/p/android/issues/detail?id=7904 in Android because of the way it stores DNS cache. Clearing the browser cache doesn't touch the DNS, the "hard reset" clears it.


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon