[#1101] Add new feature to allow user scan QR code from saved image#1141
Open
ShinChan1420 wants to merge 5 commits intoSwati4star:masterfrom
Open
[#1101] Add new feature to allow user scan QR code from saved image#1141ShinChan1420 wants to merge 5 commits intoSwati4star:masterfrom
ShinChan1420 wants to merge 5 commits intoSwati4star:masterfrom
Conversation
QrBarcodeScanFragment.java : add logical code drawable: add two xml icon, ic_barcode_from_image_24dp.xml and ic_qrcode_from_image_24dp.xml modify fragment_qrcode_barcode.xml modify strings.xml
|
Code Climate has analyzed commit 2a57627 and detected 7 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
Author
|
I will fix these issues. |
Delete useless things, such as check permission that have been already given
Author
This file contains hidden or 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
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.
QrBarcodeScanFragment.java: add logical code
drawable: add two xml icons, ic_barcode_from_image_24dp.xml and ic_qrcode_from_image_24dp.xml
modify fragment_qrcode_barcode.xml
modify strings.xml
Description
ScreenShots for the new feature in UI:

Two new buttons
users choose images from the gallery

when the user scanned no corresponding code or no code in the saved image

when the user scanned a detectable code

As I cannot change the UI in the camera scanning interface, I prefer to add two access points for users to choose what they want to do with the QR/bar code scanner, either read from the gallery or the camera.
I created two new cards for users to choose whether to scan with the camera or from images from the gallery.
I believe this is the optimal solution while maintaining the speed of the original camera opening and not changing the camera interface. It raises the learning cost for the user. Still, once the user is familiar with it, he/she will find it much more appealing as it doesn't pop up a window asking which one to choose and then has to click again to select it if he/she touches it accidentally by mistake. Large icons and clickable areas reduce the number of accidental touches.
Fixes #1101
Type of change
Just put an x in the [] which are valid.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
./gradlew assembleDebug assembleRelease./gradlew checkstyleChecklist:
And new codes are highlighted, it's easy to see what has been changed.
Moreover, I found it was incompatible with my editor when I wanted to do the tests on it. I just made a local change with the test. Nothing more changes
System: macOS 14.0
CPU: Apple M2 Pro
EDITOR: Android Studio Flamingo | 2022.2.1