ConnectivityMonitor
Connectivity monitor can be used to monitor changes to host network connectivity changes.
Types
Link copied to clipboard
interface Listener
The contract of a listener that can receive callback notifications from the ConnectivityMonitor
Link copied to clipboard
List of supported network types.
Functions
Link copied to clipboard
Adds the specified listener to the list of listeners that will be notified when the host device's network connectivity state changes.
Link copied to clipboard
Gets the human readable name of the current network, if connected.
Link copied to clipboard
Get reference to a cached instance of ConnectivityMonitor.
Link copied to clipboard
Checks if the host device has an active network connection.
Checks if the host device is connected to the using one of the allowed network type.
Checks if the specified network is one of the allowed network type.
Link copied to clipboard
Checks if the active network connection is a Wi-Fi network.
Link copied to clipboard
Removes the specified listener from the list of listeners that will be notified when the host device's network connectivity state changes.