Connectivity service provides device connectivity status and change notifications, allowing you to monitor network connection types.
Usage
Add theConnectivity service to your page overlay and use its methods to check network connectivity:
Methods
get_connectivity()
Returns the current connectivity type(s).
ConnectivityType enum values representing the current connectivity types. Multiple types can be active simultaneously (e.g., WiFi and VPN).
Example:
Events
on_change
Called when the network connectivity changes.
ConnectivityChangeEvent with:
connectivity(list[ConnectivityType]): Current connectivity type(s)
Enums
ConnectivityType
Enum representing network connectivity types:
BLUETOOTH: Bluetooth connectivityETHERNET: Ethernet connectivityMOBILE: Mobile data connectivity (3G, 4G, 5G)NONE: No connectivityOTHER: Other connectivity typesVPN: VPN connectivityWIFI: Wi-Fi connectivity
Complete Example
Use Cases
Adaptive Content Loading
Sync Management
Platform Availability
The Connectivity service is available on all platforms:| Platform | Support |
|---|---|
| Android | ✓ |
| iOS | ✓ |
| macOS | ✓ |
| Windows | ✓ |
| Linux | ✓ |
| Web | ✓ |