Network

The Network API provides the connectivity details.

Install

//with npm
npm install @capacitor/network


Usage

transition({
	type: MOBILE_NETWORK_STATE,
    onData: (status) => {
        `Current Network State: ${JSON.stringify(status)}`
    }
})


API

ID Next States Description
MOBILE_NETWORK_STATE MOBILE_ON_LOADED This transition provides network connectivity information.


Properties

name type default description
onData callback The callback which provides the network status information