제가 블루투스를 공부 중인데요
만약에 이 소스가 h1.java소스라하면 h2.java에서 이것을 텍스트 뷰에서 출력하고 싶은데 어떻게 해야되나요?
public void run() {
Log.i(TAG, "BEGIN mConnectedThread");
byte[] buffer = new byte[1024];
int bytes;
// Keep listening to the InputStream while connected
while (true) {
try {
// Read from the InputStream
String message="";
while (message.length()<9) {
bytes = mmInStream.read(buffer);
message = message.concat(new String(buffer,0,bytes));}
//mHandler.obtainMessage(MainController.MESSAGE_READ, bytes, -1, buffer)
//.sendToTarget();
} catch (IOException e) {
Log.e(TAG, "disconnected", e);
connectionLost();
break;
}
}
}