Skip to content

Commit

Permalink
Merge pull request #471 from NordicSemiconductor/scan-delay
Browse files Browse the repository at this point in the history
Adding a 500 ms delay before disconnecting
  • Loading branch information
philips77 authored Oct 25, 2024
2 parents abd9edc + 82dec08 commit c020b04
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ public void performDfu(@NonNull final Intent intent)
// but reset instead. In that case, Android would assume disconnection after
// "supervision timeout" seconds, which may be 5 more seconds.
if (shouldScanForBootloader()) {
// Why waiting? See: https://github.com/NordicSemiconductor/Android-DFU-Library/issues/444
mService.waitFor(500);

// If the device will use a different address in bootloader mode, there is no
// reason to wait for that. The library will immediately start scanning for the
// device advertising in bootloader mode and connect to it.
Expand Down

0 comments on commit c020b04

Please sign in to comment.