npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

cordovanetworkmanager

v2.6.0

Published

Cordova Network Manager for Android and iOS

Readme

Cordova Network Manager

Latest Stable Release: v2.6.0 (08/10/2018)

Run cordova plugin add [email protected]

Latest Dev Release: v2.6.0 (08/10/2018)

Note: The latest Dev Release may be unstable. It is highly recommend installing from the latest stable release via above.

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.

Contact me via Discord: Nomm#0176

Global Functions

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


cordovaNetworkManager.getCurrentSSID(success, fail)
  • Returns the current SSID and passes to the success callback.

cordovaNetworkManager.getCurrentBSSID(success, fail)
  • Returns the current BSSID and passes to the success callback.

iOS Functions

iOS functionality is limited. It is important to understand the following points.

  • iOSConnectNetwork() & iOSDisconnectNetwork() only work in iOS version 11 or greater. You will have to rely on configuration profiles for backwards compatibility prior to this. Apple only released the functionality to perform 'hotspot configurations' in October 2017.

  • This will not run in the xCode simulator and requires a physical iOS device to be connected to the machine when building. If you don't attach a physical device, the build will fail.

  • Capabilities 'HotspotConfiguration' and 'NetworkExtensions' needed to be enabled/added to the xCode project prior to building. -- This plugin will add the capabilities automatically to your xCode project.


cordovaNetworkManager.iOSConnectNetwork(ssid, ssidPassword, success, fail)
  • Returns a promise that will resolve when the network once the success or error callback fires. -- Prior to resolving the promise, it will check whether or not we are connected to the specified SSID (network)
  • SSID is the network to connect to
  • Password is the password of the given SSID

cordovaNetworkManager.iOSDisconnectNetwork(ssid, success, fail)
  • SSID is the network to disconnect from

Android Functions

Android functionality was based on the original [WifiWizard](https://github.com/hoerresb/WifiWizard). This repository is stale and out-dated and Cordova-Network-Manager has provided some much needed improvements and updates to the Android platform.


cordovaNetworkManager.androidConnectNetwork(ssid, ssidToDisable, success, fail)
  • ssidToDisable is an optional parameter that will disable the provided SSID to ensure a reconnection doesn't occur.
  • If no SSID is required to be disabled, pass in an empty string: ""
  • Android OS has an issue whereby it randomly connects back to specified networks/priority networks even if you tell them to connect to another network

cordovaNetworkManager.androidDisconnectNetwork(ssid, ssidToEnable, success, fail)
  • ssidToEnable is an optional parameter that will enable the provided SSID. It should only be used to enable a previously disabled network.
  • If no SSID is required to be enabled, pass in an empty string

cordovaNetworkManager.formatWifiConfig(ssid, password, algorithm)
  • Formats the wifi configuration information into a JSON for use with the addNetwork function. Currently, only WPA is supported for the algorithm value.

cordovaNetworkManager.formatWPAConfig(ssid, password)
  • Is a helper method that returns an object which can be used to add a WPA wifi network.

cordovaNetworkManager.addNetwork(wifi, success, fail)
  • Adds the network to the list of available networks that the user can log into. wifi needs to be an object as formatted by formatWifiConfig. success and fail are callback functions to be executed based on the result of the call.

cordovaNetworkManager.removeNetwork(wifi, success, fail)
  • Removes the network with the given SSID. success and fail are callback functions.

cordovaNetworkManager.listNetworks(success, fail)
  • Retrieves a list of the configured networks as an array of strings and passes them to the function listHandler.

cordovaNetworkManager.startScan(success, fail)
  • Starts WiFi scanning. success is called when scanning has started.

cordovaNetworkManager.getScanResults(\[options\], success, fail)
  • Retrieves a list of the available networks as an array of objects and passes them to the function listHandler. The format of the array is:
networks = [
    {   "level": signal_level, // raw RSSI value
        "SSID": ssid, // SSID as string, with escaped double quotes: "\"ssid name\""
        "BSSID": bssid // MAC address of WiFi router as string
        "frequency": frequency of the access point channel in MHz
        "capabilities": capabilities // Describes the authentication, key management, and encryption schemes supported by the access point.
    }
]

cordovaNetworkManager.isWifiEnabled(success, fail)
  • Retrieves the current Wifi Enabled status. Passes true or false.

cordovaNetworkManager.setWifiEnabled(enabled, success, fail)
  • Sets the WiFi status. enabled is a Boolean type, so to disable the Wifi, you'd execute cordovaNetworkManager.setWifiEnabled(false, 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 [email protected]

License

  • MIT