Keeping BLE connected when switching/closing screen

Here are some samples:

Essentially, yes. No Internet required.

Try this: dataFromScreen2.aia (4.1 KB)
Build the APK and check ...

Note: In order for the timer to work in the background for a longer period of time, a Foreground service is also required.

Screen1:

Screen2:

See also here:

1 Like

Bear in mind that we have seen memory corruption issues when a Clock Timer is left running in a screen that is not the currently displayed screen, so advice has been to disable all clocks before switching screens.

When Screen2 is closed, the timer is disabled automatically. On Screen1 the timer must not be disabled, because the result is needed on Screen2. Screen1 is not closed but only in the background. There have never been any problem running a Clock when the screen is in the background (not visible or in idle mode).

An example to work with two Screens and Bluetooth in this topic:

2 Likes

As I understand the situation, that is the intention, but it doesn't always happen.

Thank you very much @Anke @Juan_Antonio !
Your answers are a a combination of a clock and a Tiny DB, this was exactly the idea and the question I asked, and you solved it.

1 Like