skunkworks-crow
skunkworks-crow copied to clipboard
Feat : added flash light while scanning QRcode
Closes #239
What has been done to verify that this works as intended?
- Whether it is turning on flash when we clicked the button
- checked is the forms are transferring or not
- when we exit activity whether is it turning off or not
Why is this the best possible solution? Were any other approaches considered?
I made a new class ScannerActivity
in that implemented the DecoratedBarcodeView.TorchListener
so it can turn on or off by user input
made 2 drawable files for flashlight button(on state and off state) instead of direct buttons
and changed the setCaptureActivity
to ScannerActivity
it is working fine as expected
I find the solution in one of the stack overflow posts is here
How does this change affect users?
By flashlight, if the user wants the flash then he will turn on or else he can turn off so the scanning of QR code can be done easily
GIF
Before submitting this PR, please make sure you have:
- [ ] run
./gradlew checkCode
and confirmed all checks still pass OR confirm CircleCI build passes - [ ] verified that any code or assets from external sources are properly credited in comments and/or in the about file.
This PR contains a lot of commits, @Chromicle try squashing your commits.
@shobhitagarwal1612 @lakshyagupta21 can you review now
@lakshyagupta21 can you please review this PR also
@Chromicle It's a great feature, please resolve the conflicts. And you can squash some commits that have no more senses.
@Chromicle It's a great feature, please resolve the conflicts. And you can squash some commits that have no more senses.
Yeah I did, I wrote tests for scannerActivity also can you please check that @lakshyagupta21 @huangyz0918
Hello!! May I work on this issue ?
Hello @soumyajit1729, I made the changes as suggested and it is not yet reviewed can you find some other open issues 😄