So I have a method that checks if the device is connected to the internet based on this one
It works ok, but in a couple of cases I find that although the phone shows being connected to the internet, it still does not have access to my server. What I am really looking to do it check connection to my specific URL.
How could I implement that?
You could do something like:
This will attempt to connect to your server’s URL and if it fails, you obviously don’t have a connection. 😉