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

cordova-plugin-rssi

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-rssi

Cordova plugin for reading WiFi RSSI

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Cordova RSSI Plugin

This plugin allows you to read WiFi RSSI from applications developed using Cordova 3.0 or newer.

Works on both Android and iOS platforms, but will not pass the Apple App Store Review process.

Installation

In your application project directory:

cordova plugin add cordova-plugin-rssi

Usage

const rssi = cordova.plugins.rssi;
rssi.read(success, failure)

Returns the device's current WiFi RSSI information via 3 parameters:

rssi.read(function success(data){
    console.log(data);
    // -> {rssi: -38, bars: 4, isIPhoneX: false}
});
  • rssi: WiFi Received Signal Strength Indicator
    • Availability: Android, iOS but not iPhoneX
    • Value: Integer or null if unavailable
    • Range: -100 ≤ x ≤ 0
  • bars: Number of visible bars in WiFi icon
    • Availability: Android, iOS
    • Value: Integer
    • Range: 0 ≤ x ≤ 4: *Range values only tested for Android
      • 4: RSSI -55+
      • 3: RSSI -56 - -66
      • 2: RSSI -67 - -77
      • 1: RSSI -78 - -88
      • 0: RSSI -89-
  • isIPhoneX: Flag for detecting whether iPhone X acquisition was used
    • Availability: Android, iOS
    • Value: Boolean

Browser / Development Usage

While developing in browser, a mock can be utilized to prevent errors. See an example Ionic 4 app at emcniece/ionic-cordova-rssi-demo.

References

Attribution

This open-source project was made possible by some fine people over at CNY Apps.

Licence

The MIT License

Keywords

FAQs

Package last updated on 31 Aug 2018

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