simblee

Best practice to stream data in realtime from Android to Bluetooth

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-09 09:20:42
问题 I have an android application that writes data to a simblee bluetooth. Below the code I have : public void sendData(String data) { Utils.addLog(TAG,"sending data : " + data); if (mSerialCharacterstic == null) { Utils.addLog(TAG,"serial characteristic not found yet!"); return; } Utils.addLog(TAG,"starting write data..."); mSerialCharacterstic.setValue(data); Utils.addLog(TAG,"writing : " + data); // mGatt.beginReliableWrite(); mGatt.writeCharacteristic(mSerialCharacterstic); } /***************

Best practice to stream data in realtime from Android to Bluetooth

狂风中的少年 提交于 2019-12-03 12:52:59
I have an android application that writes data to a simblee bluetooth. Below the code I have : public void sendData(String data) { Utils.addLog(TAG,"sending data : " + data); if (mSerialCharacterstic == null) { Utils.addLog(TAG,"serial characteristic not found yet!"); return; } Utils.addLog(TAG,"starting write data..."); mSerialCharacterstic.setValue(data); Utils.addLog(TAG,"writing : " + data); // mGatt.beginReliableWrite(); mGatt.writeCharacteristic(mSerialCharacterstic); } /*******************/ @Override public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic