@Override
public void onServicesDiscovered(BluetoothGatt gatt, int status) {
if(status == BluetoothGatt.GATT_SUCCESS){
for(BluetoothGattService service : gatt.getServices()){
Log.d(mTAG, "service: " + service.getUuid().toString());
}
//Log.d(mTAG, "mGattMiFloraService: " + UUID_MI_FLORA_SERVICE_ID.toString());
mGattMiFloraService = gatt.getService(UUID_MI_FLORA_SERVICE_ID);
if(mGattMiFloraService != null){
boolean rs = gatt.readCharacteristic(mGattMiFloraService.getCharacteristic(UUID_MI_FLORA_FIRMWARE));
if(!rs){
Log.i(mTAG, "Can't read mGattMiFloraFwCharacteristic");
}
}
}
else{
gatt.close();
mIsConnecting = false;
}
}
MiFloraSensorEntity.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:Sense-Hub-Android-Things
作者:
评论列表
文章目录