Question

public boolean requestRouteToHost (int networkType, int hostAddress)

This method in ConnectivityManager if used with networkType set to wifi interface always returns false.

requestRouteToHost android says it was never implemented for the wifi interface.

Even InetAddress.isReachable() always returns false for publicservers like google.com, java.com

Is there any specific reason why they fail? The only way I could test if there was connectivity was by executing the "ping" by using runtime exec().

Was it helpful?

Solution

Apparently this is a bug and this has been raised.

OTHER TIPS

This appears to be fixed in ICS. My 2.3 Desire fails in the same way, but my 4.0.4 SGS2 gets a successful true result from requestRouteToHost over WiFi.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top