I want to make an open source app which should know if it can access the outside world (aka the Internet). It can be blocked from the Internet for various reasons, such as not configured proxies or those annoying browser authentications from wireless networks.
Is there some kind of service which I can ping to see if I have access to the Internet, or some recommendation or common practice on verifying it? I know I can just e.g. ping Google but I would prefer to use some specific service or adopt a best practice.
Well as you say it yourself : you just want to know if the Internet is accessible with a ping. A ping won’t return you more than a success, so I don’t see what kind of additionnal service you could get.
And as stated, you could use Google. My guess would be that you should pick something safe, that you know you’ll have an answer from even if they have problems on their end : so what could be best than pinging Google ? If there’s Internet connectivity, that will work better than anything.
If you were to get more information about your connectivity (latency, location or whatever) you could think of using a specific service, but pinging Google seems the best here.