如何将最终字符串“数据”放入此函数beginListenForData
()以供另一个函数upload
()使用?BeginListen
从蓝牙获取数据...
void beginListenForData()
{
final Handler handler = new Handler();
workerThread = new Thread(new Runnable()
{
public void run()
{
try {
final String data = new String(encodedBytes, "US-ASCII");
readBufferPosition = 0;
//data2=data;
handler.post(new Runnable()
{
public void run()
{
myLabel.setText(data);