BleGattCoroutines v0.2.0
This release is compiled with Kotlin 1.2.71 and relies on the version 0.30.2
of kotlinx.coroutines.
It also relies on three Splitties
artifacts (App Context, Main Thread & Checked Lazy) of the version 2.0.0-alpha06.
Changes
GattConnection
is now an interface (was previously a class). You can still instantiate it
with constructor-like syntax.- Instead of suspending any pending request when a disconnection has occured, a
ConnectionClosedException
will be thrown. Note that it is a subclass ofCancellationException
,
so it will cancel the coroutine without crashing your application, but you should still handle it
properly, especially if you want to retry or recover. - You can pass
ConnectionSettings
when creating aGattConnection
instance. With this, you can
change transport, physical layer (aka. PHY) and enable auto connect. requireXxx
extension functions forGattConnection
,BluetoothGattService
and
BluetoothGattCharacteristic
thanks to @Miha-x64 contribution.