ConnectionObserver.onDeviceDisconnected() never get called when remote device(HR monitor) is turned off or out of range

I'm using "no.nordicsemi.android:ble" and "no.nordicsemi.android:ble-common" on a tablet app, and had created a virtual device(Polar HR) on my iPhone with LightBlue app. When I connect I received the event through ConnectionObserver, also when I locally initiate disconnection, but if I turn the Polar HR on the iPhone, the tablet app doesn't trigger the disconnected event. I have no way to know when the device has been disconnected remotely(turn off, out of range) so I can alert the user.

Parents
  • Hello,

    Try turning the iPhone or Bluetooth in Settings off (not in quick menu). In my opinion the iPhone still keeps the connection to your Android device, and doing so you'll make sure the connection was cancelled. Also, you may try nRF Connect for iOS instead of LightBlue. Perhaps there's a bug in LightBlue app where disconnection doesn't actually disconnect. Or, it may be a iOS "feature".

Reply
  • Hello,

    Try turning the iPhone or Bluetooth in Settings off (not in quick menu). In my opinion the iPhone still keeps the connection to your Android device, and doing so you'll make sure the connection was cancelled. Also, you may try nRF Connect for iOS instead of LightBlue. Perhaps there's a bug in LightBlue app where disconnection doesn't actually disconnect. Or, it may be a iOS "feature".

Children
No Data
Related