polarofficial / polar-ble-sdk

Repository includes SDK and code examples. More info https://polar.com/en/developers
Other
447 stars 147 forks source link

Subscription on listOfflineRecordings() never terminates when device disconnected #417

Open Preventicus-Sebastian opened 7 months ago

Preventicus-Sebastian commented 7 months ago

Platform on which you observed the bug:

Device on which you observed the bug:

Describe the bug When listing offline recordings (via listOfflineRecordings()) on a Polar Verity Sense device and connection ist lost before a result is received (e.g. due to bluetooth disabled), the function never terminates (callbacks on rx subscription are never called).

How to Reproduce

  1. connect to Polar Veritiy Sense
  2. call listOfflineRecordings() for connected device
  3. disable bluetooth while listOfflineRecordings() is in progress
  4. callbacks for subscription on listOfflineRecordings() are never called

Expected behavior

samulimaa commented 3 months ago

Hello,

Thanks for your report.

I tested this using Verity Sense and iOS example application available in this GitHub repository. I observed that the onError() function is triggered when Bluetooth is disabled from the system settings while listOfflineRecordings() is in progress.

How are you calling listOfflineRecordings()? For reference here, is example how example app calls listOfflineRecordings().