To install this plugin, follow the Command-line Interface Guide.
If you are not using the Cordova Command-line Interface, follow Using Plugman to Manage Plugins.
$ cordova plugin add https://bitbucket.org/ThreeScreens/cordova-wireless-network-information
- type {String}
- WWANOffline
- WWANOnline
- ConnectionTestFailed
- ConnectionTestSuccess
Create an instance:
var n = new navigator.wirelessConnection();
console.log("Plugin network type is: ", n.type);
Event Listeners
document.addEventListener("WWANOffline", yourCallbackFunction, false);
document.addEventListener("WWANOnline", yourCallbackFunction, false);
document.addEventListener("ConnectionTestSuccess", yourCallbackFunction, false);
document.addEventListener("ConnectionTestFailed", yourCallbackFunction, false);