MORE-Platform / more-app-multiplatform

The mobile application for the MORE platform.
https://more-health.at
Other
6 stars 1 forks source link

Improve bluethooth connection and rights request workflow for connected sensing devices (e.g. Polar Verity Sense) #200

Open alireza-dhp opened 10 months ago

alireza-dhp commented 10 months ago

When running the app on iOS for the first time,before logging via a token a popup message appears, requesting permission to use Bluetooth.

public

Upon denying the Bluetooth permission request, and after enter the token and accept the concept, the app encounters a failure and cannot proceed.

IMG_0013

smeddinck commented 9 months ago

alsp improve the Polar integration interface in the Mobile App with all the error handling and proper feedback

may be important to implement better temporary locking in in the user interface, implement connection dialogue as a popup and also possibly integrate documentation for manual workarounds (e.g. connecting devices via system settings and only THEN adding them in MORE)

smeddinck commented 9 months ago

Issues also exist in Android!

andresgruber commented 5 months ago

Describe the different cases @alireza-dhp :

smeddinck commented 4 months ago
  1. Initial connection needs to make sure that appropriate OS rights requests are made. This procedure should be a triggerable process, since it can then be used for a "manual reconnect" procedure as a last-resort repair mechanism following programmatic and/or manual unlinking as much as possible (see below). The workflow and status signaling must be very clear to users and they should not be able to issue multiple simultaneous connection requests.
  2. If we are in a known observation period, i.e. data capture is expected to be active and the BT connection live, but it is not live, or no data is incoming: programmatic reconnect procedure in the background.
  3. After N automatic reconnects and/or X duration of "expected data not incoming" (best to keep such variables in config files), trigger a manual reconnect procedure as a last resort (include clear instructions to users).
ja-fra commented 4 months ago

We suggest the following workflow to handle the connections to external devices (Polar):

  1. On study-signup we offer to connect external devices on the "External Devices"-screen (if required by the study, as it is currently implemented)
  2. If the participant does not connect a device, the affected observations are marked with a ⚠-Icon
  3. Additionally, we'll show a ⚠-message on the top of the Dashboard.
  4. Both ⚠ take the participant to the "External Devices"-screen
  5. When an observation starts (should start) the app tries to (re-)connect to the external device. If this fails, the app will send a notification to the user.
  6. When the device disconnects while the observation is running, the app internally tries to reconnect. If this fails, the app will send a notification to the user.
andresgruber commented 3 months ago

Improvements for bluetooth connection with Polar MORE-200

Primary use cases positively tested with App version 4.0.10 on iOS 17.5.1 (iPhoneSE)

Other cases positively tested

Cases with remaining issues or known limitations

alireza-dhp commented 2 months ago

Dear @andresgruber,

I have tested the improvements made to the Bluetooth connection and found that it works significantly better than before. Thank you for the enhancements.

There are some issues that I observed: