INNER CODE UNIT · Java

onServicesDiscovered

nic-delhi/AarogyaSetu_Android · app/src/main/java/nic/goi/aarogyasetu/GattClient.java:62

        public void onServicesDiscovered(BluetoothGatt gatt, int status) {
            if (status == BluetoothGatt.GATT_SUCCESS) {

                BluetoothGattService service = gatt.getService(UUID.fromString(BuildConfig.SERVICE_UUID));
                if (service != null) {
                    BluetoothGattCharacteristic probCharacteristic = service.getCharacteristic(UUID.fromString(BuildConfig.PINGER_UUID));
                    if (probCharacteristic != null) {
                        chars.add(probCharacteristic);
                    }
                    BluetoothGattCharacteristic idCharacteristic = service.getCharacteristic(UUID.fromString(BuildConfig.DID_UUID));
                    if (idCharacteristic != null) {
                        chars.add(idCharacteristic);
                    }
                }
                requestCharacteristics(gatt);
            } else {
                Logger.w(TAG, "onServicesDiscovered received: " + status);
            }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…