The problem that app shuts down automatically when Android development board opens thread to read serial port data for a long time

at the request of the company, we recently used the android development board to develop a set of app to receive the temperature and humidity data transmitted by the probe through the serial port. The main purpose is to collect data all the time and use the data for analysis, so app is required to run stably for a long time.

first of all, the main Activity has been set to normally bright

clipboard.png

app

app

clipboard.png

`try{


app

I"d like to ask why app can"t run for a long time, and which part of the functional module is the cause of the problem.

Mar.22,2021

Gods, ask for guidance

Menu