Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed scanning with screen off #455

Merged
merged 3 commits into from
Sep 9, 2024
Merged

Fixed scanning with screen off #455

merged 3 commits into from
Sep 9, 2024

Conversation

philips77
Copy link
Member

This PR fixes #453.

This PR introduces non-empty scan filters for Android 8 and above and an option to customize it from the app.
Override getDeviceSelector() method in your DfuService implementation to specify custom filters.

The UUID is passed to new getScanFilters(...) method in DfuDeviceSelector.
By default, the selector will filter for Service UUID with the currently used DFU Service UUID:

  • Legacy DFU UUID
  • Secure DFU UUID
  • Custom UUID if UuidHelper was used to modify it.

Using non-empty filters should fix the issue where no devices were found when the app is in background.

@philips77 philips77 merged commit 41c81d6 into main Sep 9, 2024
1 check passed
@philips77 philips77 deleted the bugfix/bg-scanning branch September 9, 2024 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DFU fails when the Android screen is off
1 participant