Skip to content
Branch: master
Find file History
Type Name Latest commit message Commit time
Failed to load latest commit information. reorganizing files into recipes folder Mar 7, 2018

id title brief sample sdk
Detect if Network is Available
This recipe shows how to detect the type of network connection that is in use.
title url
Reachability Sample


The Reachability sample provides a static class named Reachability that can be used to determine network status. Add a copy of this class to your project, and then use the static methods it provides.

  • To see if a web site is available you can check like this:
if(!Reachability.IsHostReachable("")) {
    // Put alternative content/message here
    // Put Internet Required Code here
  • To check what type of internet connection is available, use the static method Reachability.InternetConnectionStatus():
NetworkStatus internetStatus = Reachability.InternetConnectionStatus();

Reachability.InternetConnectionStatus returns the enum NetworkStatus which provides some information about the network connection that will be used for internet connectivity:

public enum NetworkStatus
You can’t perform that action at this time.