Home > Mobile > Android development, bluetooth connection is successful, read sensor data problems
Android development, bluetooth connection is successful, read sensor data problems
Time:09-19
In page, A bluetooth connection successfully, and the socket through the singleton pattern to page B, B page remove the socket, but always black screen when receiving sensor data, can't jump, As shown in figure 1, if not add cycle, can read data at a time, As shown in figure 2, if added A while loop, when the page from A page jump to B has been blank screen, can't jump to page B
CodePudding user response:
Using thread or ThreadHandler, that while you card dead