diff options
author | Sven Gothel <[email protected]> | 2020-06-09 18:15:17 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-06-09 18:15:17 +0200 |
commit | 6caf7695b85aca8d3962e1ffcfd350fc97e698dd (patch) | |
tree | 056f221b27a10b17d59d9cb929f541435d8accb6 /java/tinyb | |
parent | 16170717a42d0897b0a8855356c7473df9922727 (diff) |
[DBT]Adapter (Java/C++) startDiscovery(bool keepAlive) policy change: keepAlive default := true
Using startDiscovery(keepAlive=true) and stopDiscovery()
is the recommended workflow for a reliable discovery process.
Without keepAlive=true, we already experienced a too short discovery cycle
where the subsequent manual startDiscovery restart will purge
the already discovered devices via removeDiscoveredDevices().
Hence keepAlive=true is strongly indicated for increased reliability
especially when _not_ using the AdapterStatusListener,
since adapter.getDevices() may simply come too late.
Diffstat (limited to 'java/tinyb')
-rw-r--r-- | java/tinyb/dbus/DBusManager.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/java/tinyb/dbus/DBusManager.java b/java/tinyb/dbus/DBusManager.java index bfcd5e4b..ffb8a935 100644 --- a/java/tinyb/dbus/DBusManager.java +++ b/java/tinyb/dbus/DBusManager.java @@ -104,6 +104,11 @@ public class DBusManager implements BluetoothManager public native boolean startDiscovery() throws BluetoothException; @Override + public boolean startDiscovery(final boolean keepAlive) throws BluetoothException { + return startDiscovery(); // FIXME keepAlive + } + + @Override public native boolean stopDiscovery() throws BluetoothException; @Override |