diff options
author | Sven Gothel <[email protected]> | 2020-02-01 11:14:14 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-02-01 11:14:14 +0100 |
commit | e32417cdef59de3bdae261e4469186c357599165 (patch) | |
tree | ca7f8cc7f1c611288ea7eb9d65e249d103897be0 /java/BluetoothManager.java | |
parent | 81ff36ed014a34be9194036e26dc9a2e272e5004 (diff) |
BluetoothManager: Expose native get_default_adapter() to java as getDefaultAdapter()
Notable: manager.stopDiscovery() doesn't lead to !manager.getDiscovering() (radio silence).
Only manager.getDefaultAdapter().stopDiscovery() worked.
Diffstat (limited to 'java/BluetoothManager.java')
-rw-r--r-- | java/BluetoothManager.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/java/BluetoothManager.java b/java/BluetoothManager.java index 0c415d6..489ac3e 100644 --- a/java/BluetoothManager.java +++ b/java/BluetoothManager.java @@ -195,6 +195,14 @@ public class BluetoothManager */ public native boolean setDefaultAdapter(BluetoothAdapter adapter); + /** Gets the default adapter to use for discovery. + * <p> + * System default is the last detected adapter at initialisation. + * </p> + * @return the used default adapter + */ + public native BluetoothAdapter getDefaultAdapter(); + /** Turns on device discovery on the default adapter if it is disabled. * @return TRUE if discovery was successfully enabled */ |