Code Monkey home page Code Monkey logo

wifiwizard's Introduction

WifiWizard

Version 0.2.3

This Phonegap plugin enables WiFi management from within Phonegap applications.

Only Android is in development at this time. iOS is planned to be developed, with other platforms following.

Installation

Run phonegap plugin install https://github.com/parsonsmatt/WifiWizard.git and add <script src="WifiWizard.js"></script> in your Phonegap project.

Usage from within Cordova/Phonegap:

  • WifiWizard.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.
  • WifiWizard.formatWPAConfig(SSID, password); is a helper method. It returns an object which can be used to add a WPA wifi network.
  • WifiWizard.addNetwork(wifi, win, 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. win and fail are callback functions to be executed based on the result of the call.
  • WifiWizard.removeNetwork(SSID, win, fail); removes the network with the given SSID. As above, win and fail are callback functions.
  • WifiWizard.connectNetwork(SSID, win, fail); connects the phone to the given Wifi network.
  • WifiWizard.disconnectNetwork(SSID, win, fail); disconnects the phone to the given Wifi network.
  • WifiWizard.listNetworks(listHandler, fail); retrieves a list of the configured networks as an array of strings and passes them to the function listHandler.
  • WifiWizard.startScan(listHandler, fail); start WiFi scanning.
  • WifiWizard.getScanResults(listHandler, fail); retrieves a list of the available networks as an array of strings and passes them to the function listHandler.

Changelog:

  • v0.2.3 - Added disconnect that does disconnection on current WiFi
  • v0.2.2 - Added startScan and getScanResults
  • v0.2.1 - Fixed reference problem in formatWPAConfig
  • v0.2.0 - Changed format of wifiConfiguration object to allow more extensibility.
  • v0.1.1 - addNetwork will now update the network if the SSID already exists.
  • v0.1.0 - All functions now work!
  • v0.0.3 - Fixed errors in native implementation. Currently, Add and Remove networks aren't working, but others are working as expected.
  • v0.0.2 - Changed plugin.xml and WifiWizard.js to attach WifiWizard directly to the HTML.
  • v0.0.1 - Initial commit

wifiwizard's People

Contributors

parsonsmatt avatar brugnara avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.