com.mutualmobile.cordova.bluetoothle
Advanced tools
Comparing version 1.0.6 to 1.0.7
{ | ||
"name": "com.mutualmobile.cordova.bluetoothle", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Connect with devices using Bluetooth Low Energy communication", | ||
@@ -5,0 +5,0 @@ "cordova": { |
@@ -9,5 +9,2 @@ | ||
// Queue all operations | ||
// https://stackoverflow.com/questions/18011816/has-native-android-ble-gatt-implementation-synchronous-nature | ||
// https://stackoverflow.com/questions/17870189/android-4-3-bluetooth-low-energy-unstable | ||
var processTasks = function() { | ||
@@ -425,7 +422,2 @@ if (!queue.length) { | ||
if (isAndroid) { | ||
// observed, undocumented: | ||
// android.bluetooth.BluetoothGattCallback#onConnectionStateChange does not | ||
// seem to be accurate. I get dropped connections and failed commands | ||
// somewhat often unless I let connect() and disconnect() "settle" after | ||
// the call. | ||
bluetoothle.connect = function(address) { | ||
@@ -435,5 +427,3 @@ clearQueue(address); | ||
exec('connect', [address]).then(function(device) { | ||
setTimeout(function() { | ||
resolve(device); | ||
}, 10); | ||
resolve(device); | ||
}, reject); | ||
@@ -448,9 +438,5 @@ }); | ||
exec('disconnect', [address]).then(function(device) { | ||
setTimeout(function() { | ||
exec('_close', [address]).then(function() { | ||
setTimeout(function() { | ||
resolve(device); | ||
}, 100); | ||
}, reject); | ||
}, 100); | ||
exec('_close', [address]).then(function() { | ||
resolve(device); | ||
}, reject); | ||
}, reject); | ||
@@ -457,0 +443,0 @@ }); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
155907
1555