Merge pull request #1526 from MilosKozak/AdrianLxM-patch-1
Get device name before setting up the callback
This commit is contained in:
commit
ad6566b133
|
@ -144,9 +144,9 @@ public class BLEComm {
|
||||||
|
|
||||||
if (L.isEnabled(L.PUMPBTCOMM))
|
if (L.isEnabled(L.PUMPBTCOMM))
|
||||||
log.debug("Trying to create a new connection from: " + from);
|
log.debug("Trying to create a new connection from: " + from);
|
||||||
|
mBluetoothDeviceName = device.getName();
|
||||||
mBluetoothGatt = device.connectGatt(service.getApplicationContext(), false, mGattCallback);
|
mBluetoothGatt = device.connectGatt(service.getApplicationContext(), false, mGattCallback);
|
||||||
setCharacteristicNotification(getUARTReadBTGattChar(), true);
|
setCharacteristicNotification(getUARTReadBTGattChar(), true);
|
||||||
mBluetoothDeviceName = device.getName();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue