Addition: filter by service data UUID with mask #144
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Hi NordicSemiconductor + contributors,
Firstly, thankyou for Android-Scanner-Compat-Library! It has really helped me in developing a Bluetooth project that supports Android SDK versions 19 to 34....
This is my first ever attempt at a pull request, so, please let me know if I am missing anything.
Additions to NordicSemiconductor's Android-Scanner-Compat-Library
My fork of the library allows for the filtering of advertising packets by service data, the same as NordicSemiconductor's Android-Scanner-Compat-Library, but also allows for a mask to be set on the service data UUID. This addition is useful if your Android app receives a dynamic service data UUID.
Sample
Use this library fork in the same way as NordicSemiconductor's Android-Scanner-Compat-Library, but, if you want to filter by a masked service data UUID, do so like this:
I have run the tests on Android 14/11/7/5.1.1 devices: all passes (bar BluetoothLeScannerImplOreoTest -> toImpl() on Android 7/5.1.1, as designed I assume).
The gradle version upgrade might be unnecessary - I cannot remember if it was a requirement for Android Studio Hedgehog 2023.1.1 or not.
Let me know if any changes are needed.
Best regards,
Gregory Thomas