Reachability.Net
A simple package to provide a unified, simple, and easy to use api for checking reachability (network connectivity) on multiple platforms (so far only iOS and Android)
Install / Use
/learn @has-taiar/Reachability.NetREADME
License
This projected is licensed under the terms of the MIT license. See LICENSE.TXT
Example Time!
The library contains simple methods for checking network connectivity on both iOS and Android All implementation of Reachability on all platforms implement IReachability interface to give you a simple and unified way of getting the connection status:
iOS
var reachability = new Reachability("http://www.bing.com");
var isConnected = reachability.IsHostReachable();
Android
var reachability = new Reachability(myActivity, "http://www.bing.com");
var isConnected = reachability.IsHostReachable();
Reachability on all Platforms
// reachability on all platforms implement IReachability which offers you:
var isReachable = reachability.IsHostReachable ();
var isReachable = reachability.IsHostReachable ("www.google.com");
var internetConnStatus = reachability.InternetConnectionStatus ()
var wifiConnStatus = reachability.LocalWifiConnectionStatus();
Note
This assumes that you have set the permissions right in your AndroidManifest file (AccessNetworkStatus, AccessWifiStatus, and AccessInternet). The implementation of the library for Android does not only rely on Android SDK for checking connectivity, we also make a small get request to verify connectivity over http (port 80). You can find more details here.
Related Skills
node-connect
341.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.6kCommit, push, and open a PR
