bluetooth-helper
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "bluetooth-helper", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"homepage": "https://github.com/evanxd/bluetooth-helper", | ||
@@ -5,0 +5,0 @@ "authors": [ |
@@ -41,4 +41,6 @@ /* global EventEmitter2 */ | ||
if (bluetooth.defaultAdapter) { | ||
return bluetooth.defaultAdapter.startDiscovery().then(discovery => { | ||
discovery.addEventListener('devicefound', | ||
// For stability, We use startLeScan to instead of startDiscovery. | ||
return bluetooth.defaultAdapter.startLeScan([]).then(scan => { | ||
this._scan = scan; | ||
scan.addEventListener('devicefound', | ||
this._handleDevicefound.bind(this)); | ||
@@ -57,3 +59,3 @@ }).catch(() => { | ||
return this._gatt.disconnect().then(() => { | ||
return bluetooth.defaultAdapter.stopDiscovery(); | ||
return bluetooth.defaultAdapter.stopLeScan(this._scan); | ||
}).then(() => { | ||
@@ -60,0 +62,0 @@ this.emit('disconnected'); |
{ | ||
"name": "bluetooth-helper", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"homepage": "https://github.com/evanxd/bluetooth-helper", | ||
@@ -5,0 +5,0 @@ "authors": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5539
121