-
Notifications
You must be signed in to change notification settings - Fork 4
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
RMET-2758 OSBarcodeLib-Android - Scan barcodes using zxing only #1
Merged
alexgerardojacinto
merged 31 commits into
development
from
feat/RMET-2758/scan-code-zxing
Nov 8, 2023
Merged
RMET-2758 OSBarcodeLib-Android - Scan barcodes using zxing only #1
alexgerardojacinto
merged 31 commits into
development
from
feat/RMET-2758/scan-code-zxing
Nov 8, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Context: MABS 10 brings these updates (https://github.com/OutSystems/private-NativeShell-Template/blob/9c1989499ebc1578dc39e167240856fe229ba52c/CHANGELOG.md?plain=1#L48C147-L48C198), so our Android libraries should be using the same versions. References: https://outsystemsrd.atlassian.net/browse/RMET-2758
Context: This PR includes a first version of the scanBarcode feature, which uses CameraX, Jetpack Compose, and ZXing to implement the scanner. References: https://outsystemsrd.atlassian.net/browse/RMET-2758
Context: We need to properly handle all possible outcomes of the scanning feature: success, cancelled, or some error that happened while scanning. References: https://outsystemsrd.atlassian.net/browse/RMET-2758
Context: This pipeline will be used to build the library and publish the version defined in the pom.xml file in our Azure repository. References: https://outsystemsrd.atlassian.net/browse/RMET-2758
Context: The version of the Android Gradle plugin we're using, that matches the one set by MABSA 10, requires Java 17 to run. References: https://outsystemsrd.atlassian.net/browse/RMET-2758
Context: We use SonarCloud for test coverage, so these steps are unnecessary. References: https://outsystemsrd.atlassian.net/browse/RMET-2758
Context: The version of the Android Gradle plugin the lib uses, which matches the one from MABS 10, requires Java 17 to run. References: https://outsystemsrd.atlassian.net/browse/RMET-2758
Context: This is a required step in the SonarCloud configuration. References: https://outsystemsrd.atlassian.net/browse/RMET-2758
Context: SonarCloud needs to be configured to look at the files where we want coverage to be analyzed. References: https://outsystemsrd.atlassian.net/browse/RMET-2758
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
alexgerardojacinto
requested review from
hectorjdgdev,
OS-ricardomoreirasilva and
OS-martacarlos
November 6, 2023 17:37
OS-ricardomoreirasilva
approved these changes
Nov 7, 2023
OS-martacarlos
approved these changes
Nov 8, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR includes the first implementation of the
scan
feature of the Barcode Android library, which only uses thezxing
library to scan the barcodes.OSBARCController
is the library's entry point and as its name suggests, acts as the Controller in the library, following the MVC pattern.OSBARCScannerActivity
, which is implemented using Jetpack Compose, is the activity responsible for opening the Camera stream, using CameraX.OSBARCBarcodeAnalyzer
is a helper class that implementsImageAnalysis.Analyzer
from CameraX, and is responsible for processing the image frames it receives and call the ZXing library to read barcodes.OSBARCScanParameters
is adata class
that represents the object with the Scan Parameters (e.g. scan instructions).OSBARCError
in anenum class
that holds the errors that the library can return in thescan barcode
feature.view/ui.theme
are helper files that were automatically generated when setting up Jetpack Compose. These may change or be removed in the future.The PR also includes the setup of the Azure pipeline (https://dev.azure.com/OutSystemsRD/Mobile%20Supported%20Plugins/_build?definitionId=4066) for the library.
It also includes the setup of the GitHub action that does code analysis using SonarCloud.
It also removes unnecessary files that came from https://github.com/OutSystems/OSLibraryTemplate-Android
Since in the next task we will be adding the scanning feature using MLKit besides Zxing, the code will still suffer a few organizational changes. Because of that, unit tests will be added in the context of the following task: https://outsystemsrd.atlassian.net/browse/RMET-2894
Context
References: https://outsystemsrd.atlassian.net/browse/RMET-2758
Type of changes
Platforms affected
Tests
Screenshots (if appropriate)
Following are videos displaying the possible flows of the
Scan Barcode
feature:Successful scan of a barcode
screen-20231106-160714.mp4
Successful scan of a barcode that is upside down
screen-20231106-160745.mp4
Canceling a scanning
screen-20231106-160813.mp4
Permission for the camera is denied
screen-20231106-160922.1.mp4
Checklist
RNMT-XXXX <title>