2017-07-23 2 views
0

Ich frage mich, was ist der beste Weg, um eine BluetoothGattCharacteristic abrufen, wenn ich die UUID und erfolgreich mit dem BLE-Gerät verbunden haben? Zum Beispiel, siehe unten. TIA.erhalten BluetoothGattCharacteristic gegeben UUID

public BluetoothGattCharacteristic retrieveCharacteristic(UUID myUUID) { 

    BluetoothGattCharacteristic returnChar; 
    BluetoothGattService myService; 

    myService = mBluetoothGatt.getService(myUUID); 
    returnChar = myService.getCharacteristic(myUUID); 
    return returnChar; 
} 

Antwort