skunkworks-crow icon indicating copy to clipboard operation
skunkworks-crow copied to clipboard

Feat : added flash light while scanning QRcode

Open ajay-prabhakar opened this issue 5 years ago • 7 comments

Closes #239

What has been done to verify that this works as intended?

  1. Whether it is turning on flash when we clicked the button
  2. checked is the forms are transferring or not
  3. 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

ezgif com-optimize

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.

ajay-prabhakar avatar Apr 05 '19 10:04 ajay-prabhakar

This PR contains a lot of commits, @Chromicle try squashing your commits.

lakshyagupta21 avatar Apr 05 '19 16:04 lakshyagupta21

@shobhitagarwal1612 @lakshyagupta21 can you review now

ajay-prabhakar avatar Apr 06 '19 20:04 ajay-prabhakar

@lakshyagupta21 can you please review this PR also

ajay-prabhakar avatar Jun 26 '19 16:06 ajay-prabhakar

@Chromicle It's a great feature, please resolve the conflicts. And you can squash some commits that have no more senses.

huangyz0918 avatar Aug 20 '19 02:08 huangyz0918

@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

ajay-prabhakar avatar Aug 21 '19 11:08 ajay-prabhakar

Hello!! May I work on this issue ?

soumyajit1729 avatar Feb 03 '20 10:02 soumyajit1729

Hello @soumyajit1729, I made the changes as suggested and it is not yet reviewed can you find some other open issues 😄

ajay-prabhakar avatar Feb 03 '20 12:02 ajay-prabhakar