begin gradle support for auto play upload

This commit is contained in:
geeksville
2020-07-20 12:07:55 -07:00
parent 753393541a
commit 750855c8d4
21 changed files with 38 additions and 4 deletions

View File

@@ -765,7 +765,7 @@ class SafeBluetooth(private val context: Context, private val device: BluetoothD
// Cancel any notifications - because when the device comes back it might have forgotten about us
notifyHandlers.clear()
closeGatt()
failAllWork(BLEException("Connection closing"))
@@ -791,7 +791,7 @@ class SafeBluetooth(private val context: Context, private val device: BluetoothD
notifyHandlers[c.uuid] = onChanged
// c.writeType = BluetoothGattCharacteristic.WRITE_TYPE_DEFAULT
gatt!!.setCharacteristicNotification(c, enable)
// per https://stackoverflow.com/questions/27068673/subscribe-to-a-ble-gatt-notification-android
val descriptor: BluetoothGattDescriptor = c.getDescriptor(configurationDescriptorUUID)
?: throw BLEException("Notify descriptor not found for ${c.uuid}") // This can happen on buggy BLE implementations