[嵌入式linux] 安卓蓝牙的问题

[复制链接]
628|0
 楼主| JY-DX-JY 发表于 2015-10-8 17:20 | 显示全部楼层 |阅读模式
myText1 = (TextView) findViewById(R.id.textView1);
                                myText1.setText("STOP:");
                                sendCmd("AAAAAA9630000101");
                                        /*Log.d("Season", "前进");*/
                                       
                                        myText1.setText("START:");

                                        byte[] tmp = new byte[5];

                                        try {
                                                 int count = InStream.available();
                                        while (count < 1)
                                        {
                                            count = InStream.available();
                                        }
                                                InStream.read(tmp, 0, 5);
                                                myText1.setText(new String(tmp, 0, 5) + " ");
                                                System.out.println(new String(tmp, 0, 5) + " ");

                                        } catch (IOException e) {
                                                e.printStackTrace();
                                               
                                        }
以上是我安卓蓝牙开发的一段代码,sendCmd("AAAAAA9630000101");
命令发送已经成功,可是myText1.setText("STOP:");STOP却不显示。
请问大神,怎么回事?谢谢!

您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:晴天响霹雳,平地一声雷。

245

主题

3351

帖子

30

粉丝
快速回复 在线客服 返回列表 返回顶部