1
0
forked from dyf/APP

解决安卓数据包问题,拆成小包发送,增加电量,续航时间,充电检测

This commit is contained in:
微微一笑
2025-10-23 15:28:47 +08:00
parent 2d3b896243
commit 8487a4303a
3 changed files with 126 additions and 139 deletions

View File

@ -1222,7 +1222,7 @@ class BleHelper {
}
setTimeout(function() {
startgetService(id);
}, 100);
}, 1000);
}
},
fail: (ex) => {
@ -1410,11 +1410,16 @@ class BleHelper {
// .LinkedList);
// 处理 MTU 设置
if (plus.os.name === 'Android') {
this.setMtu(deviceId);
}
if (plus.os.name === 'Android') {
this.setMtu(deviceId).then(() => {
resolve(true);
}).catch(() => {
resolve(true); //mtu设置失败也算成功
})
} else {
resolve(true);
}
}).catch((ex) => {
reject(this.getError(ex));
});