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

cordova-plugin-wifiinfo

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-wifiinfo

Cordova plugin for gathering WiFi network information

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
40
increased by471.43%
Maintainers
1
Weekly downloads
 
Created
Source

Cordova WifiInfo Plugin

This plugin allows you to read WiFi network status information from applications developed using PhoneGap/Cordova 3.0 or newer.

Only works with Android for now until I figure out how to get this data in Swift.

  • Github: emcniece/cordova-plugin-wifiinfo
  • NPM: cordova-plugin-wifiinfo

Installation

In your application project directory:

cordova plugin add cordova-plugin-wifiinfo

Usage

const wifi = cordova.plugins.wifiinfo;
getHostname(success, failure)

Returns this device's hostname.

wifi.getHostname(function success(hostname){
    console.log(hostname); // ipad-of-user.local.
});
getInfo(success, failure)

Returns this device's network info. Android only.

wifi.getInfo(function success(info){
    console.log(info); //
    /*
    {
        hostname: 'ipad-of-user.local',

        // ConnectionInfo
        connection: {
            bssid (string)
            hidden (boolean): Whether the network is hidden or not
            ip (string)
            speed (int): Uplink speed
            mac (string)
            rssi (int)
            ssid (string)
            frequency (int): WiFi band, Lollipop (API 26+) only
        },

        // DhcpInfo
        dhcp: {
            dns1 (string)
            dns2 (string)
            gateway (string)
            ip (string)
            lease (int): Lifespan of DHCP lease
            netmask (string)
            server (string)
        },

        // list of IPv4 and IPv6 interfaces
        interfaces: {
            wlan0: {
                ipv4Addresses[],
                ipv6Addresses[]
            }
        }
    }
    */
});

ToDo

Licence

The MIT License

Keywords

FAQs

Package last updated on 26 Mar 2022

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