views:

206

answers:

1

In Monotouch on an iPhone/iPod, how do I detect if there is an internet connection available?

+4  A: 

The best way right now is to use this class from Miguel de Icaza's GitHub repository:

http://github.com/migueldeicaza/monotouch-samples/blob/master/reachability/reachability.cs

Its a static class with a lot of methods, so all you have to do is add it to your project and call, for example:

NetworkStatus status = Reachability.InternetConnectionStatus();
Eduardo Scoz