protected virtual void ReadService(BluetoothGatt gatt) { DumpServices(gatt); BluetoothGattService service = gatt.Services[index]; if (service != null) { sampleService = new SampleService(gatt, service, this); } //BluetoothGattService service = gatt.GetService(SERVICE_GENERIC_ACCESS); //if (service != null) //{ // genericAccess = new GenericAccessService(gatt, service); //} }
public virtual void ReadNextService(BluetoothGatt gatt) { index++; Log.Debug(TAG, "ReadNextService({0})", index); if (index < gatt.Services.Count) { BluetoothGattService service = gatt.Services[index]; if (service != null) { BlutoothService.Dump(service, gattServerName); if (sampleService != null) { sampleService = null; } sampleService = new SampleService(gatt, service, this); } } else { Log.Debug(TAG, "ReadNextService finished"); } }