There is such a problem - on Android 4.3 every time you connect to a device via BLE, time is spent searching for services and device characteristics. It takes 1-4 seconds. Is it possible to cancel the search for services to save time if all the necessary UUID services are already known? Thank!

PS: on older APIs, such as deeper support for BLE, and there, perhaps, there is no such problem, but I would like to solve the problem with this particular API.

1 answer 1

You need a Gatt object, in which there should be all services, features and descriptors ... Since this object is returned by the onServicesDiscovered(BluetoothGatt gatt, int status) method onServicesDiscovered(BluetoothGatt gatt, int status) , I think that this should be done. Unless to try to save the state of the Gatt object with services and so on. and get by with the connection.