How to check the internet connectivity within the network in Android (using internet of some other device through HOTSPOT)
I have a requirement where I want to check whether there is any internet connectivity when I am connected with the network. For example, I have device A and device B. Device A is connected with hotspot with that of device B. In device A, I get it as connected with Wi-Fi and in device B - one device connected with hotspot. Now, if I remove the internet from device B (not the tethering hotspot), then in device A, it still shows - connected with Wi-Fi but there is no internet connectivity. Classes like ConnectivityManager help in determining whether a device is connected with the network not