本帖最後由 chihhao81 於 2013-7-20 14:00 編輯
這是Activity 當我藍芽收到資料的時候
case BluetoothManager.SOCKET_READ_OK:
byte[] readBuf = (byte[]) msg.obj;
String recvData = getCurrentTimString() + ":" + new String(readBuf, 0, msg.arg1);
etShow.setText( recvData + "\n" + etShow.getText().toString());
showToast("收到資料!");
//
Intent it = new Intent();
it.setClass(MainActivity.this, MyCustomView.class);
Bundle bundle = new Bundle();
bundle.putInt("data", Integer.valueOf(recvData));
it.putExtras(bundle);
startActivity(it);
break;
這邊我想把bundle裡的值取出 畫出來
|