Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-hotspot

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-hotspot

Cordova WiFi Hotspot Plugin

  • 0.4.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Cordova HotSpot Plugin

Build Status npm version Dependency Status devDependency Status

A Cordova plugin for managing HotSpot networks on Android with Cordova 3.4.0 / API Level 19

NPM

Installation

$ cordova plugin add cordova-plugin-hotspot

Usage

Check if Plugin is available

cordova.plugins.hotspot.isAvailable(
    function (isAvailable) {
        // alert('Service is not available') unless isAvailable;
    }
);

Hotspot functionality

Create Hotspot
cordova.plugins.hotspot.createHotspot(ssid, mode, password, 
    function () {
        // Hotspot is created
    },function () {
        // Error
    }
);
Stop Hotspot
cordova.plugins.hotspot.stopHotspot(
    function () {
        // Hotspot is disabled
    },function () {
        // Error
    }
);
Check if Hotspot is enabled
cordova.plugins.hotspot.isHotspotEnabled(
    function () {
        // Hotspot is on
    },function () {
        // Hotspot is off
    }
);
Get all connected devices
cordova.plugins.hotspot.getAllHotspotDevices(
    function (devices) {
        // array of JSON objects:
        // -> ip
        // -> mac
    },function (err) {
        // error
    }
);

Wifi

Check if Wifi is supported

cordova.plugins.hotspot.isWifiSupported(
   function () {
       // wifi is on
   },function () {
       // wifi is off
   }
);
Check if Wifi is enabled
cordova.plugins.hotspot.isWifiOn(
   function () {
       // wifi is on
   },function () {
       // wifi is off
   }
);

Check if Wifi Direct is supported

cordova.plugins.hotspot.isWifiDirectSupported(
    function () {
        // wifi is on
    },function () {
        // wifi is off
    }
);
Add a network config
cordova.plugins.hotspot.addWifiNetwork(ssid, mode, password,
   function () {
       // wifi is added
   },function (err) {
       // error
   }
);
Delete a network config
cordova.plugins.hotspot.removeWifiNetwork(ssid, 
   function () {
       // wifi is deleted
   },function (err) {
       // error
   }
);
Start a periodically scan
cordova.plugins.hotspot.startPeriodicallyScan(interval, duration,
   function () {
       // success
   },function (err) {
       // error
   }
);
Scan network
cordova.plugins.hotspot.scanWifi( 
   function (listOfNetworks) {
       // array of results
   },function (err) {
       // error
   }
);
Scan network by level
cordova.plugins.hotspot.scanWifiByLevel(
   function (listOfNetworks) {
       // array of results
   },function (err) {
       // error
   }
);
Stop a periodically scan
cordova.plugins.hotspot.stopPeriodicallyScan( 
   function () {
       // success
   },function (err) {
       // error
   }
);

Keywords

FAQs

Package last updated on 06 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc