kvision / pl.treksoft.kvision.cordova / Network

Network

object Network

Main object for Cordova network.

Types

ConnectionType

enum class ConnectionType

Connection types

NetworkEvent

enum class NetworkEvent

Network status events

Functions

addStatusListener

fun addStatusListener(event: Network.NetworkEvent, listener: () -> Unit): Unit

Add listeners for network status Cordova events.

getConnectionType

suspend fun getConnectionType(): Network.ConnectionType

Get network connection type.

Extension Functions

createInstance

fun <T> Any?.createInstance(vararg args: dynamic): T

Helper function for creating JavaScript objects from dynamic constructors.