android 蓝牙writeCharacteristic不成功

当多个writeCharacteristic连续发送的时候可能不成功,需要延时发送

new Thread(){
    @Override
    public void run() {
        super.run();
        setCharacteristicNotification(mCharacteristicNotify, true);
        try {
            sleep(200);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        boolean writeTrue =writeCharacteristic(bluetoothGattCharacteristic, byteValue);
            if(writeTrue){
                LogUtils.showXQLOG("发送验证 writeTrue true");
            }else{
                LogUtils.showXQLOG("发送验证 writeTrue=false");
            }
    }
}.start();

你可能感兴趣的:(android)