Enhance getSystemDevice API on macOS with Broader Default Services Fi… (#121)

* Enhance getSystemDevice API on macOS with Broader Default Services Filter

* Update docs

* Update darwin/Classes/UniversalBlePlugin.swift

Co-authored-by: Foti Dim <foti@navideck.com>

* Reorder fields

* Use ScanFilter ui for getting system devices

---------

Co-authored-by: Foti Dim <fdimanidis@gmail.com>
Co-authored-by: Foti Dim <foti@navideck.com>
This commit is contained in:
Rohit Sangwan
2025-01-02 10:28:51 +00:00
committed by GitHub
parent dd75894244
commit f3411280e9
9 changed files with 40 additions and 25 deletions
+3 -3
View File
@@ -102,9 +102,9 @@ See the [Bluetooth Availability](#bluetooth-availability) section for more.
Already connected devices, connected either through previous sessions, other apps or through system settings, won't show up as scan results. You can get those using `getSystemDevices()`.
```dart
// Get already connected devices
// You can set `withServices` to narrow down the results
// On `Apple`, `withServices` is required to get connected devices, else [1800] service will be used as default filter.
// Get already connected devices.
// You can set `withServices` to narrow down the results.
// On `Apple`, `withServices` is required to get any connected devices. If not passed, several [18XX] generic services will be set by default.
List<BleDevice> devices = await UniversalBle.getSystemDevices(withServices: []);
```