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:
_1val isConnected = KmpConnectivity.isConnected()
To check for SSID (network name) of the currently connected network:
_1val 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" />