Android Question problem with GUI update, bluetooth, asyncstreams

yogie

Member
Licensed User
Longtime User
I have an activity with 3 progressbars and some radiobuttons. The progressbars should show a kind of signal strengths.
With a timer (10 ms) I create test signals, the displays work and the activity is operable (radiobuttons react ...).

Now I use a real transmission of data with bluetooth and AsyncStreams instead of the timer.
The data rate is about 20 data strings per second. The transmission works but after a few seconds
the activity does not react anymore.

Instead of updating the display/GUI directly with the result of AsyncStreams I have also used a
timer that fetches the data from AsyncStreams and then updates the GUI. Result see above.

sleep(0) at different places doesn't show any improvement.

What is the best way to decouple or synchronize such a transfer and the GUI of an activity.


The main problem is solved, in a list too much memory was used.
Nevertheless the question remains:
What is the best way to decouple or synchronize such a transfer and the GUI of an activity.
 
Last edited:
Top