I'v made a Ble(Bluetooth 4.0 LE) App.
This App send byte data to BT device.
I had test when I made this function, but as soon as send(write) device was disconnected.
why disconnect?
Especially, LG SMART Phone.
Plz Help me..
//////////////
public static void Send_Data(byte[] data) {
if (mByteCharacteristic != null ) {
mByteCharacteristic.setValue(data);
mByteCharacteristic setWriteType(BluetoothGattCharacteristic.WRITE_TYPE_NO_RESPONSE);
if (bluetoothGatt != null) {
bluetoothGatt.writeCharacteristic(mByteCharacteristic);
}
}
}
///////////////
Make sure that:
Otherwise try omitting the
setWriteType()
call. By default the characteristic should be using the correct write type.