We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › detect computer is not have internet connection
Page Index Toggle Pages: 1
detect computer is not have internet connection (Read 211 times)
detect computer is not have internet connection
Dec 2nd, 2008, 4:40pm
 
I am not sure this is the right discourse - section.
My question is about find when sketch (producing a desktop app) not have internet connection available. The aim is not make calls to internet and show to user need connect it.

Re: detect computer is not have internet connectio
Reply #1 - Dec 3rd, 2008, 10:47am
 
I think the easiest way is to try to reach a file on the internet. If you can't, then maybe the user don't have internet access.

Quote:
String[] lines = loadStrings("http://www.google.fr");
if (lines != null) {
  // internet connection available
else {
  // could not reach the website
}
Page Index Toggle Pages: 1