getNetworkType abstract method

Future<int> getNetworkType()

Gets the type of the local network connection.

You can use this method to get the type of network in use at any stage. You can call this method either before or after joining a channel.

Returns ≥ 0: The method call is successful, and the local network connection type is returned. 0: The SDK disconnects from the network. 1: The network type is LAN. 2: The network type is Wi-Fi (including hotspots). 3: The network type is mobile 2G. 4: The network type is mobile 3G. 5: The network type is mobile 4G. 6: The network type is mobile 5G. < 0: The method call failed with an error code. -1: The network type is unknown.

Implementation

Future<int> getNetworkType();