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

CodePudding user response:

reference 1st floor BDMH response:
use threads or ThreadHandler, that while you card dead

Sorry, I'm a beginner this??
Excuse me, is with threadhandler after B page jump

CodePudding user response:

Put the while in the thread

CodePudding user response:

The
reference 3 floor BDMH response:
put while in the thread

Ok, I will try, thank????

CodePudding user response:

The
reference 3 floor BDMH response:
put while in the thread

Problem has been solved, thank you
  • Related