I am looking for a piece of code that would check network connectivity, of an Android device, including tethering, not only the wireless channels.
I have spent hours online looking for such a thing, but without any result! All the functions I found out manage only wireless net tests. Nothing with tethering. So is it at least possible? Do you have some corresponding?
this checks if Tethering is enabled. Cut from a class I changed to get adbWireless working over a tethered connection:
And you also need android.permission.ACCESS_WIFI_STATE
Check this out:
Also add such permission into AndroidManifest.xml: