Merge pull request #1526 from MilosKozak/AdrianLxM-patch-1

Get device name before setting up the callback
This commit is contained in:
Milos Kozak 2018-10-29 09:59:44 +01:00 committed by GitHub
commit ad6566b133
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -144,9 +144,9 @@ public class BLEComm {
if (L.isEnabled(L.PUMPBTCOMM))
log.debug("Trying to create a new connection from: " + from);
mBluetoothDeviceName = device.getName();
mBluetoothGatt = device.connectGatt(service.getApplicationContext(), false, mGattCallback);
setCharacteristicNotification(getUARTReadBTGattChar(), true);
mBluetoothDeviceName = device.getName();
return true;
}