Reputation: 3172
Sometime a user can directly connect a ble peripheral under settings. But when the app is launched and started scanning for devices, the peripheral cannot be discovered because it is already connected and stopped advertising.
So, is there anyway to get all currently connected ble peripherals in Android filtered by service UUID?
Thanks!
Upvotes: 0
Views: 806
Reputation: 18452
You can use https://developer.android.com/reference/android/bluetooth/BluetoothManager#getConnectedDevices(int). However, you can't filter on service uuid. In that case you need to first make your own gatt connection and perform a service discovery.
Upvotes: 0