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)
context.getSystemService(Context.CONNECTIVITY_SERVICE);
                if(cm != null){
                        NetworkInfo nf = cm.getActiveNetworkInfo();
                        if(nf != null){
                                networkType = nf.getType();
                        }
                        URL url = new URL(urlString);
                        InetAddress  iAddress = 
InetAddress.getByName(url.getHost());
                        ret = cm.requestRouteToHost(networkType,
ipToInt(iAddress.getHostAddress()));
                }
                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...

Thx

Falko

--~--~---------~--~----~------------~-------~--~----~

2. Using instrumented h/w OpenGL ES library

The new gl_wrapper.cpp added libhgld.so.  What's the difference for
loading the 3D hardware driver from libhgl.so and libhgld.so?  Thanks.
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

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