public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) {
if (this.mGatt != gatt) {
this.mGatt = gatt;
}
if (newState == 2) {
QNLog.log("连接设备成功");
this.qnDecoder = null;
this.mGatt.discoverServices();
} else if (newState == 0) {
this.mGatt.close();
this.uiHandler.post(new 1 (this));
this.qnDecoder = null;
} else {
gatt.disconnect();
QNLog.error("连接状态异常:", Integer.valueOf(status));
this.uiHandler.post(new 2 (this));
if (this.bleCallback != null) {
this.bleCallback.onCompete(5);
}
}
}
QNBleHelper.java 文件源码
java
阅读 70
收藏 0
点赞 0
评论 0
项目:boohee_v5.6
作者:
评论列表
文章目录