AAT
AAT copied to clipboard
BLE Reconnect
When connection is lost with BLE sensor temporarly (e.g. increase distance and come back) we need to reconnect through user interfaces.
Would it make sense to reconnect through a periodic audit. e.g. periodically recall "updateConnections()" ? and how ? or detect loss and re trigger ?
I discover this nice application day after day. Realized that SensorStateButton helps to refresh connection. AAT/app/src/main/java/ch/bailu/aat/views/description/SensorStateButton.java
In interim I patched TrackerStateButton to tap few times to "react" on top of its main function in Cockpit display see below..
Maybe the best (lower battery impact) solution is to have a "Click" update with HR or Cadence number buttons (like altitude number button)
AAT/app/src/main/java/ch/bailu/aat/views/description/TrackerStateButton.java
@Override public void onClick(View v) { if (v==this) { new InsideContext(scontext) { @Override public void run() { scontext.getTrackerService().getState().onStartPauseResume(); } }; new InsideContext(scontext) { @Override public void run() { scontext.getSensorService().updateConnections(); } }; } }