New
BleGattCoroutines v0.4.0
Publication of this version is broken, use 0.4.1 or newer instead.
Compiled with Kotlin 1.3.31 (and kotlinx.coroutines 1.2.1).
This is an important release for BleGattCoroutines that includes fixes, improvements & new features.
Fixes
- Fix rare hard to track uncaught exceptions caused by
offercalled on closed channels. (744e862f) - Automatically request disconnect on close by default. Avoids issue where connection is not stopped by close on Android's side and prevents subsequent connections.
New features
- Add a public
bluetoothDeviceproperty to theGattConnectioninterface, thanks to Brian Parma contribution. - Add
requestMtufunction onGattConnection, thanks to Bill Cauchois contribution. - Add first-class notifications enabling on remote device with
setCharacteristicNotificationsEnabledOnRemoteDevice. This was the most requested feature. - Add
openNotificationSubscriptionfunction to receive notifications only for a specific characteristic. This can replace usage of thenotifyChannelproperty.
Changes
- The
notifyChannelproperty now returns a new subscription each time, so it is possible to have multiple consumers. - Exceptions to catch are now mentioned in
GattConnectionKDoc. (b85c9bea) - Add workaround for
Dispatchers.Maininitialization doing blocking I/O (8783db98). - Drop main thread usage requirement. You can now use the dispatcher you want.
- Samples and
@RequiresApiannotations migrated to AndroidX. - Samples now properly request runtime permissions, with a single suspending function call thanks to Splitties permissions.
- Minor doc improvements.