-
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-2759 OSBarcodeLib-Android - Implement torch button #6
Merged
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: The flashlight button should only be presented if the flashlight is available in the camera that is being used (front or back). References: https://outsystemsrd.atlassian.net/browse/RMET-2759
Context: Our previous way of determining if the camera had a flashlight available was using the "isFlashAvailable" helper method. This method required a SuppressLint("RestrictedApi") annotation because of "selector.lensFacing". We should avoid using this specific annotation, and method "selector.lensFacing" isn't supposed to be used. References: https://outsystemsrd.atlassian.net/browse/RMET-2759
Context: We need to use different images to represent the on and off state. References: https://outsystemsrd.atlassian.net/browse/RMET-2759
Context: We want to overlay Buttons and more elements on top of the Camera view. To do that, we need to use the Box composable that is designed for that. References: https://outsystemsrd.atlassian.net/browse/RMET-2759
alexgerardojacinto
changed the title
Feat/rmet 2759/torch button
RMET-2759 OSBarcodeLib-Android - Implement torch button
Nov 14, 2023
alexgerardojacinto
requested review from
nflsilva,
hectorjdgdev,
OS-ricardomoreirasilva and
OS-martacarlos
November 15, 2023 08:22
src/main/kotlin/com/outsystems/plugins/barcode/view/OSBARCScannerActivity.kt
Outdated
Show resolved
Hide resolved
Context: Since both catches do the exact same thing, we might as well only catch "Exception", that will include "CameraAccessException". References: https://outsystemsrd.atlassian.net/browse/RMET-2759
src/main/kotlin/com/outsystems/plugins/barcode/view/OSBARCScannerActivity.kt
Outdated
Show resolved
Hide resolved
Context: If "enableTorch" throws an exception, we don't want to alter the value of "isFlashlightOn" because we failed to alter the flashlight's state. References: https://outsystemsrd.atlassian.net/browse/RMET-2759
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
OS-ricardomoreirasilva
approved these changes
Nov 15, 2023
OS-martacarlos
approved these changes
Nov 16, 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
TorchButton
function that contains aButton
composabletoggleFlashlight
function that is used to turn the flashlight on and off.flash_on.xml
andflash_off.xml
).Context
References: https://outsystemsrd.atlassian.net/browse/RMET-2759
Type of changes
Platforms affected
Tests
Screenshots (if appropriate)
screen-20231114-202355.mp4
Checklist
RNMT-XXXX <title>