Added isNetworkConnected method.