Socket
Socket
Sign inDemoInstall

react-native-ble-manager

Package Overview
Dependencies
Maintainers
1
Versions
161
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-ble-manager - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

7

BleManager.js

@@ -71,5 +71,8 @@ 'use strict';

scan(serviceUUIDs, seconds) {
scan(serviceUUIDs, seconds, allowDuplicates) {
return new Promise((fulfill, reject) => {
bleManager.scan(serviceUUIDs, seconds,(success) => {
if (allowDuplicates == null) {
allowDuplicates = false;
}
bleManager.scan(serviceUUIDs, seconds, allowDuplicates, (success) => {
fulfill();

@@ -76,0 +79,0 @@ });

{
"name": "react-native-ble-manager",
"version": "1.0.0",
"version": "1.1.0",
"description": "A BLE module for react native.",

@@ -18,3 +18,4 @@ "main": "BleManager",

"ble",
"bluetooth"
"bluetooth",
"low energy"
],

@@ -21,0 +22,0 @@ "license": "Apache-2.0",

@@ -72,6 +72,7 @@ # react-native-ble-manager

- `seconds` - `Integer` - the amount of seconds to scan.
- `allowDuplicates` - `Boolean` - [iOS only] allow duplicates in device scanning
__Examples__
```js
BleManager.scan([], 5)
BleManager.scan([], 5, true)
.then(() => {

@@ -81,3 +82,3 @@ // Success code

});
```

@@ -172,3 +173,3 @@

- `characteristicUUID` - `String` - the UUID of the characteristic.
__Examples__

@@ -196,3 +197,3 @@ ```js

- `data` - `String` - the data to write in Base64 format.
To get the `data` into base64 format, you will need a library like `base64-js`. Install `base64-js`:

@@ -232,4 +233,4 @@

'BleManagerStopScan',
() => {
// Scanning is stopped
() => {
// Scanning is stopped
}

@@ -249,3 +250,3 @@ );

'BleManagerDidUpdateState',
(args) => {
(args) => {
// The new state: args.state

@@ -267,3 +268,3 @@ }

'BleManagerDiscoverPeripheral',
(args) => {
(args) => {
// The id: args.id

@@ -288,2 +289,1 @@ // The name: args.name

- `peripheral` - `String` - the id of the peripheral

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