Skip to content

Commit

Permalink
Merge pull request #576 from leixiaoming8/master
Browse files Browse the repository at this point in the history
Modify connect failure
  • Loading branch information
randdusing authored Mar 8, 2020
2 parents f8749ca + 899d18b commit dd74bd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/android/BluetoothLePlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -1478,11 +1478,11 @@ private void connectAction(JSONArray args, CallbackContext callbackContext) {
autoConnect = obj.optBoolean("autoConnect", false);
}

connections.put(device.getAddress(), connection);

BluetoothGatt bluetoothGatt = device.connectGatt(cordova.getActivity().getApplicationContext(), autoConnect, bluetoothGattCallback);

connection.put(keyPeripheral, bluetoothGatt);

connections.put(device.getAddress(), connection);
}

private void reconnectAction(JSONArray args, CallbackContext callbackContext) {
Expand Down

0 comments on commit dd74bd3

Please sign in to comment.