Android Question How to make an app faster

nicodh

Member
Licensed User
Longtime User
Hello,

I'm looking for a soution to a minor problem i'm running with my app.

The app is running using either bluetooth or usb otg to connect to an external board.

One of the features is retrieving some data from the board and print it on the screen (realtime data form a sensor for example). My biggest issue today is that i can only run this cycle every 50ms. If i try to go faster the app get stucked. I'm using the serial textreader and writer for bluetooth and asyncstream for the usb (not at the same time of course). My communication baudrate is set by the board at 115200.

I was thinking on putting the communication part and some part of the bytes treatment of the app in a service or different thread.

Is this going to make the app run faster?

Thanks for helping me with this thing.
 

nicodh

Member
Licensed User
Longtime User
stuck as my data does not get updated. But it is unclear to me what happens, nothing is showed in logs. The app still works, i can change from the realtime panel to another panel, get back and it works. I add a log each time the app read data, that is why i say it is stuck sometimes it does not read aymore.
 
Upvote 0

eps

Expert
Licensed User
Longtime User
I think you need to do a bit more analysis and add a bit more debug logging to see what the timings are and where it gets stuck or if it's just been stopped by the OS for some reason.
 
Upvote 0
Top