requestRouteToHost always returns false on AVD

by Tina » Tue, 20 Jul 2010 21:59:08 GMT

Sponsored Links
 Hi, all!
I need to check web site availability and use requestRouteToHost  for
that purpose. On real device everything works fine, but on emulator
requestRouteToHost  always return "false".
What's wrong?
Code is:

public static boolean isHostAvailable(Context context, String
urlString) throws UnknownHostException, MalformedURLException {
                boolean ret = false;
                int networkType = ConnectivityManager.TYPE_WIFI;
                ConnectivityManager cm = (ConnectivityManager)
                if(cm != null){
                        NetworkInfo nf = cm.getActiveNetworkInfo();
                        if(nf != null){
                                networkType = nf.getType();
                        URL url = new URL(urlString);
                        InetAddress  iAddress = 
                        ret = cm.requestRouteToHost(networkType,
                return ret;


Other Threads

1. Which IDE is better for kernel development?Is it possible in windows?

Hi  ,

Which IDE is better for kernel development in windows.What are other
tools to download to build the kernel in windows.




2. how do I load the new compiled kernel on my android dev phone 2 (htc)?

I have a pretty basic question regarding loading the android kernel. I
have downloaded and compiled the latest android kernel source as
described here
My question is how do I load the new compiled kernel on my android dev
phone 2?


3. Is there any issues bugs or upgrade to Android kernal?

4. Why some threads have no reply option?

5. Object Pooling

6. FREE ADVERTISING WORK!-it's your Promotion

7. EditTextPreference: how to make it single-line?