diff options
author | Sven Gothel <[email protected]> | 2021-10-15 07:30:50 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2021-10-15 07:30:50 +0200 |
commit | ba532125142d8d409e79b605e7274b52fd34f00f (patch) | |
tree | 1caaae5303a96f16fc26604240ab5133edce68a4 /examples/java | |
parent | 3929d33c666f046f157b77d99ea9ab34ddbe688a (diff) |
README.md: Mention Peripheral Example C++/Java; Sync both
The Java example is currently not yet working ...
Diffstat (limited to 'examples/java')
-rw-r--r-- | examples/java/DBTPeripheral00.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/java/DBTPeripheral00.java b/examples/java/DBTPeripheral00.java index 6eb2436d..773f2f8c 100644 --- a/examples/java/DBTPeripheral00.java +++ b/examples/java/DBTPeripheral00.java @@ -205,6 +205,9 @@ public class DBTPeripheral00 { @Override public void deviceDisconnected(final BTDevice device, final HCIStatusCode reason, final short handle, final long timestamp) { BTUtils.println(System.err, "****** DISCONNECTED: Reason "+reason+", old handle 0x"+Integer.toHexString(handle)+": "+device+" on "+device.getAdapter()); + + executeOffThread( () -> { startAdvertising(device.getAdapter(), "device-disconnected"); }, + "DBT-StartAdvertising-"+device.getAdapter().getAddressAndType(), true /* detach */); } @Override |