You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For Peripheral.observe, when subscribers goes from 1 to 0, then underlying notifications/indications are stopped. Although this will also occur even if starting notifications/indications previously failed, or if connection drops. In both cases, stopping notifications/indications should not be attempted (the underlying BLE system will automatically clear notifications/indications).
Because these I/O operations are occurring when they shouldn't (aren't needed), the following exception is being thrown from the observe flow:
Caused by com.juul.kable.GattRequestRejectedException
at com.juul.kable.PeripheralKt.setCharacteristicNotification(PeripheralKt.java:471)
at com.juul.kable.PeripheralKt.access$setCharacteristicNotification(PeripheralKt.java:1)
at com.juul.kable.AndroidPeripheral.stopObservation$core_release(AndroidPeripheral.java:391)
at com.juul.kable.AndroidPeripheral$stopObservation$1.invokeSuspend(AndroidPeripheral.java:12)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl.java:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:104)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.java:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.java:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.java:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.java:665)
The text was updated successfully, but these errors were encountered:
On an internal project, noticed that some BLE connections stalled after app was in the background for a long period of time (with device coming in and out of range).
Not sure if it is a regression due to the changes in the SNAPSHOT mentioned above, but I'm going to do more testing before merging #193.
For
Peripheral.observe
, when subscribers goes from1
to0
, then underlying notifications/indications are stopped. Although this will also occur even if starting notifications/indications previously failed, or if connection drops. In both cases, stopping notifications/indications should not be attempted (the underlying BLE system will automatically clear notifications/indications).Because these I/O operations are occurring when they shouldn't (aren't needed), the following exception is being thrown from the
observe
flow:The text was updated successfully, but these errors were encountered: