clariusdev / mobileapi

Android API Allowing IPC with the Clarius App
https://www.clarius.com
BSD 3-Clause "New" or "Revised" License
12 stars 4 forks source link

Notify third-party app when probe suddenly disconnects #25

Closed pcanas closed 1 year ago

pcanas commented 2 years ago

Hi, As part of our solution, we would like to know when a sudden disconnection occurs while using the probe. For example, if Clarius App suddenly closes, onServiceDisconnected gets triggered.

However, if we disconnect from the WiFi but keep the Clarius App open, we can still bind to the app and make requests such as asking for depth, gain or freeze status, with no further consequence (no MSG_LICENSE_CHANGED reply was sent).

I have tried the quickstart version from https://github.com/clariusdev/mobileapi/commit/6e1cef883f07bb86979ed47c3a849df6138d525e and encountered the same issue. We would like to know if there is a way to notify the third-party app when the service is connected but there is no connection to the probe.

Thanks!

julien-l commented 2 years ago

Hello there is no such message in the Mobile API. I will log a feature request for our next team meeting. In the meantime, a workaround is to monitor new images: no new image and not frozen implies disconnection.

pcanas commented 2 years ago

Thanks for your prompt reply and suggestion, Julien. I think this would be an interesting feature to fully cover probe connection status.

clariusk commented 1 year ago

deprecated API, closing