@Override public void onPacketReceived(String address, final byte[] packet) { //Modified String readMessage = " "+bytesToHexString(packet, packet.length); fmsg += readMessage; Log.d(TAG, "PACKET RECV("+address+") : " + new String(packet)); handler.post(new Runnable() { @Override public void run() { adapter.add("RECV: " + fmsg); adapter.notifyDataSetChanged(); } }); /*** orignal * Log.d(TAG, "PACKET RECV("+address+") : " + new String(packet)); handler.post(new Runnable() { @Override public void run() { adapter.add("RECV: " + new String(packet)); adapter.notifyDataSetChanged(); } }); */
记录蓝牙接收 msg.obj.toString()乱码的问题
于 2018-10-15 09:53:50 首次发布