Socket
Socket
Sign inDemoInstall

cordova-plugin-ble-central

Package Overview
Dependencies
Maintainers
2
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-ble-central - npm Package Compare versions

Comparing version 1.7.0-alpha.1 to 1.7.0-alpha.2

.github/workflows/cordova.yml

2

package.json
{
"name": "cordova-plugin-ble-central",
"version": "1.7.0-alpha.1",
"version": "1.7.0-alpha.2",
"description": "Bluetooth Low Energy (BLE) Central Plugin",

@@ -5,0 +5,0 @@ "cordova": {

@@ -248,4 +248,5 @@ # Bluetooth Low Energy (BLE) Central Plugin for Apache Cordova

- **options**: an object specifying a set of name-value pairs. The currently acceptable options are:
- _reportDuplicates_: _true_ if duplicate devices should be reported, _false_ (default) if devices should only be reported once. [optional]
- _scanMode_: String defines [setScanMode()](https://developer.android.com/reference/kotlin/android/bluetooth/le/ScanSettings.Builder#setscanmode) argument on Android.
- _reportDuplicates_: _true_ if duplicate devices should be reported, _false_ (default) if devices should only be reported once.
- _duration_: time in seconds to scan for. (default) Scans forever when not specified.
- _scanMode_: String defines [setScanMode()](https://developer.android.com/reference/kotlin/android/bluetooth/le/ScanSettings.Builder#setscanmode) argument on Android. Default on Android is _lowPower_. When interactive scanning from an app, _lowLatency_ can boost how quickly the device is found, at the expense of using more battery power.
Can be one of: _lowPower_ | _balanced_ | _lowLatency_ | _opportunistic_

@@ -252,0 +253,0 @@ - _callbackType_: String defines [setCallbackType()](https://developer.android.com/reference/kotlin/android/bluetooth/le/ScanSettings.Builder#setcallbacktype) argument on Android.

@@ -19,10 +19,3 @@

deviceInfos: new Map(),
scan: function(services, seconds, success, failure) {
return this.startScanWithOptions(services, {}, success, failure);
},
startScan: function(services, success, failure) {
return this.startScanWithOptions(services, {}, success, failure);
},
startScanWithOptions: function(services, options, success, failure) {
startScanWithOptions: function (services, options, success, failure) {
if (!navigator.bluetooth) {

@@ -29,0 +22,0 @@ failure('Bluetooth is not supported on this browser.');

@@ -48,2 +48,4 @@ declare namespace BLECentralPlugin {

reportDuplicates?: boolean;
/** Scanning duration in seconds */
duration?: number;
}

@@ -50,0 +52,0 @@

@@ -54,15 +54,7 @@ // (c) 2014-2016 Don Coleman

scan: function (services, seconds, success, failure) {
var successWrapper = function (peripheral) {
convertToNativeJS(peripheral);
success(peripheral);
};
cordova.exec(successWrapper, failure, 'BLE', 'scan', [services, seconds]);
module.exports.startScanWithOptions(services, { duration: seconds }, success, failure);
},
startScan: function (services, success, failure) {
var successWrapper = function (peripheral) {
convertToNativeJS(peripheral);
success(peripheral);
};
cordova.exec(successWrapper, failure, 'BLE', 'startScan', [services]);
module.exports.startScanWithOptions(services, undefined, success, failure);
},

@@ -69,0 +61,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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