Bluetooth low energy reactive framework for Android written in Kotlin
mavenCentral()
, according to the Maven Central policies, I must update my package package to match with the host domain I own. Unfortunately I only own masselis.com
, so the package name RxBluetothKotlin were renamed from com.vincentmasselis.rxbluetoothkotlin
to com.masselis.rxbluetoothkotlin
, as consequence, you have to renamed EVERY import from rxbluetoothkotlin to the new package name.This new version 1.3.0 introduce a big refactor of the way to handle disconnection and how they are handled by RxBluetoothGatt
and RxBluetoothGatt.Callback
. This change speeds up the runtime and make the source code far more readable. For theses reasons some of methods are no longer working as they used to.
DeviceDisconnected
with the status -1
, starting from now the BluetoothIsTurnedOff
exception is fired insteadconnectRxGatt
and connectTypeGatt
have a new parameter connectGattWrapper
. Replace the default implementation to decide, by yourself, which connectGatt
method from the system API you want to use, autoConnect
param doesn’t longer existscallbackConstructor
param name was replaced by rxCallbackBuilder
rxGattConstructor
param name was replaced by rxGattBuilder
GattDeviceDisconnected
was removed because this throwable wasn’t thrown anywhereRxBluetoothGatt.Callback
is now an interface instead of an abstract classRxBluetoothGatt.Callback
doesn’t longer implements BluetoothGattCallback
RxBluetoothGatt.Callback
has 2 new member source: BluetoothGattCallback
and onReliableWriteCompleted
(not used at this time) and 2 new methods livingConnection()
and disconnection()
checkIfAlreadyWritten
was removed from the method write(descriptor, value)
RxBluetoothGatt
and RxBluetoothGatt.Callback