As an exploration of the component I’ve written and shared a sample that takes advantage of
all the APIs in the component I could find. The sample is available at https://github.com/jhealy/Connectivity-Plugin-Sample .
Why did I bother building a new sample when James already gave us a sample in his plugins repository?
James’s sample is a “IsConnected” detection snippet, but no other APIs are explored. And
there was no Android version. Thus my full on Connectivity Plugin API explorer was conceived.
The sample I’ve published reacts to status changes. I’ve supplied iOS, Android, and UWP implementations. Inside we have an enumeration of the following APIs from the Connectivity plugin.
- IsConnected – Is there an active Internet connection
- ConnectionStatus changes – React when bandwidth or connection status changes
- ConnectionTypes – Enumerate available connection types
- Bandwidths – Enumerate available bandwidths
- IsReachable – Is machine or URL reachable
- IsRemoteReachable – Is host by IP or URL reachable
Have fun and enjoy. Feedback is welcome. Tip of the fish to Michael Stonis ( @MichaelStonis ) for
pointing out this component to me.
- Connectivity Plugin for Xamarin – https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/Connectivity
- Connecity Plugin All APIs Sample – https://github.com/jhealy/Connectivity-Plugin-Sample