summaryrefslogtreecommitdiffstats
path: root/examples/java/ScannerTinyB10.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-08-23 09:51:06 +0200
committerSven Gothel <[email protected]>2020-08-23 09:51:06 +0200
commit5b60e93bb7b716ece4233dd22fedbe1610664ede (patch)
treeade697af75f601f6f76cf011ed09b25880a515d7 /examples/java/ScannerTinyB10.java
parent1b2a1eaae24734eda2708550aa17bfce6b13cac8 (diff)
ScannerTinyB10: Expose start/stop discovery result / dbt_scanner10: Align discovery toggle with ScannerTinyB10
Diffstat (limited to 'examples/java/ScannerTinyB10.java')
-rw-r--r--examples/java/ScannerTinyB10.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/examples/java/ScannerTinyB10.java b/examples/java/ScannerTinyB10.java
index a56ce9ab..1815bf50 100644
--- a/examples/java/ScannerTinyB10.java
+++ b/examples/java/ScannerTinyB10.java
@@ -183,7 +183,10 @@ public class ScannerTinyB10 {
private void connectDiscoveredDevice(final BluetoothDevice device) {
println("****** Connecting Device: Start " + device.toString());
- device.getAdapter().stopDiscovery();
+ {
+ final boolean r = device.getAdapter().stopDiscovery();
+ println("****** Connecting Device: stopDiscovery result "+r);
+ }
HCIStatusCode res;
if( !USE_WHITELIST ) {
res = device.connect();
@@ -192,7 +195,8 @@ public class ScannerTinyB10 {
}
println("****** Connecting Device Command, res "+res+": End result "+res+" of " + device.toString());
if( !USE_WHITELIST && 0 == devicesInProcessing.size() && HCIStatusCode.SUCCESS != res ) {
- device.getAdapter().startDiscovery( true );
+ final boolean r = device.getAdapter().startDiscovery( true );
+ println("****** Connecting Device: startDiscovery result "+r);
}
}
@@ -231,7 +235,11 @@ public class ScannerTinyB10 {
private void processConnectedDevice(final BluetoothDevice device) {
println("****** Processing Device: Start " + device.toString());
- device.getAdapter().stopDiscovery(); // make sure for pending connections on failed connect*(..) command
+ {
+ // make sure for pending connections on failed connect*(..) command
+ final boolean r = device.getAdapter().stopDiscovery();
+ println("****** Processing Device: stopDiscovery result "+r);
+ }
final long t1 = BluetoothUtils.getCurrentMilliseconds();
boolean success = false;