1.3.0 • Published 6 years ago

cordova-plugin-cordovanetworkmanager v1.3.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

Cordova Network Manager

Cordova Network Manager enables Wifi management for both Android and iOS applications within Cordova/Phonegap projects.

iOS has limited functionality as Apple's WifiManager equivalent is only available as a private API. Any app that used these features would not be allowed on the app store.

This readme is a work in progress and so are the comments in the code.

Global Functions

These are functions that can be used by both Android and iOS applications

cordovaNetworkManager.getConnectedSSID(success, fail)
cordovaNetworkManager.getConnectedBSSID(success, fail)

iOS Functions

For functionality, you need to note the following:

  • Connect/Disconnect only works for iOS11+
  • Can't run in the simulator so you need to attach an actual device when building with xCode
  • Need to add the 'HotspotConfiguration' and 'NetworkExtensions' capabilities to your xCode project
cordovaNetworkManager.iOSConnectNetwork(ssid, ssidPassword, success, fail)
cordovaNetworkManager.iOSDisconnectNetwork(ssid, success, fail)

Android Functions

Based off the original WifiWizard however will undergo a rework.

cordovaNetworkManager.androidConnectNetwork(ssid, success, fail)
cordovaNetworkManager.androidDisconnectNetwork(ssid, success, fail)
cordovaNetworkManager.formatWifiConfig(ssid, password, algorithm)
cordovaNetworkManager.formatWPAConfig(ssid, password)
cordovaNetworkManager.addNetwork(wifi, success, fail)
cordovaNetworkManager.removeNetwork(wifi, success, fail)
cordovaNetworkManager.listNetworks(success, fail)
cordovaNetworkManager.startScan(success, fail)
cordovaNetworkManager.getScanResults([options], success, fail)
cordovaNetworkManager.isWifiEnabled(success, fail)
cordovaNetworkManager.setWifiEnabled(enabled, success, fail)

Installation

Master

Run cordova plugin add https://github.com/arsenal942/Cordova-Network-Manager

This plugin is in active development. If you are wanting to have the latest and greatest stable version, then run the 'Releases' command below.

Releases

Run cordova plugin add cordova-plugin-cordovanetworkmanager

License

MIT