Skip to main content

Manage Networking & Connectivity

Manage Networking & Connectivity

Use this component to monitor network changes, and check SSID of the device.

To get started using it, you must use KmpConnectivity.

To monitor connectivity status changes:


_3
KmpConnectivity.listenToConnectionChange{
_3
val isConnected = it
_3
}

To check for current connectivity status:


_1
val isConnected = KmpConnectivity.isConnected()

To check for SSID (network name) of the currently connected network:


_1
val isConnected = KmpConnectivity.getCurrentNetworkName()

Any Setup Required?

For Android add the following installation permissions into your manifest:


_2
<uses-permission android:name="android.permission.INTERNET" />
_2
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />