Greetings everyone! I\'m getting rather fed up with android\'s ConnectivityManager class. I\'ve been trying for 5 hours to get the requestRouteToHost to work. I\'m running my co
The requestRouteToHost(lookupHost()) combination you are doing is very risky
See your code:
conn_man.requestRouteToHost(ConnectivityManager.TYPE_WIFI, lookupHost("localhost")))
Here, you first made a host lookup, and next you are requesting a route to it. It will work fine only for static addresses (like localhost), where no real lookup is done. If you need a DNS lookup to resolve host address, it will fail easily. Generally, requestRouteToHost is handy for static addresses only.