$cordovaNetwork

This plugin provides an implementation of an old version of the Network Information API. It provides information about the device’s cellular and wifi connection, and whether the device has an internet connection.

cordova plugin add cordova-plugin-network-information

Methods

getNetwork()

This property offers a fast way to determine the device’s network connection state, and type of connection.