requestRouteToHost returns false on wifi interface
Asked Answered
C

2

3

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().

Circum answered 30/11, 2011 at 7:27 Comment(1)
Can you post a link to the bug report?Copestone
C
0

Apparently this is a bug and this has been raised.

Circum answered 3/4, 2012 at 16:49 Comment(1)
Can you post a link to the bug report.Copestone
K
0

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.

Keratoplasty answered 10/4, 2012 at 17:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.