Is it possible to determine if the public WiFi
network that the user has connected to has active connectivity?
Eg: You walk into a starbucks where you can connect to their free WiFi
. The caveat being that you need to accept their terms & conditions to use it.
Put it in another way, is there a way to determine that even though the device is connected to the Starbucks WiFi
, is he/she actually able to use the internet
? I looked up a bunch of different SO posts:
How to check internet is available in wifi(Though Wifi is connected )
how to check that internet on local wifi is available or not?
None of them work. Apparently, despite connecting to the aforementioned WiFi
network, the http status code
received in the response is still 200
for me.
Am i missing something here?
if there are terms and conditions ... then you won't be able to tell until they are accepted. If there are no preconditions ... then automatically connecting and pinging a known external server would give a good indicator of such.