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. Problems installing on a Dev Phone

Hello guys,

I just got my developer G1 and Im having problems installing software. It
stops in the marketplace saying "starting download" but never continues.
Might there be a problem with my google account?

My only explanation is that my boss used a different developer account than
the google account that i finally used to set up the phone...

Does anyone had similas problems? I cant find anything on the web...




2. Using instrumented h/w OpenGL ES library

The new gl_wrapper.cpp added  What's the difference for
loading the 3D hardware driver from and  Thanks.

3. About give new ISurface for video rendering(Both Camera and Player)

4. Contact groups

5. adb devices command sees multiple offline devices attached - but it's the same device

6. SetAlpha weirdness

7. k850i