Skip to content
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

[Question] Customization of the scanner behavior #10

Closed
dmalukov opened this issue Jun 22, 2021 · 5 comments
Closed

[Question] Customization of the scanner behavior #10

dmalukov opened this issue Jun 22, 2021 · 5 comments
Labels
help wanted Extra attention is needed improvement New feature or request

Comments

@dmalukov
Copy link

Hello there!

The lib works like a charm, the only difficulty we faced is that it's impossible to customize behavior of the scanner.

For instance, we'd like to implement additional check of QR code right in the QRScannerActivity
to avoid finishing the activity while the scanning result does not meet certain criteria.

Obviously, forking the project is an option, but maybe you can recommend something else?

@G00fY2 G00fY2 added improvement New feature or request question Further information is requested help wanted Extra attention is needed and removed question Further information is requested labels Jun 22, 2021
@G00fY2
Copy link
Owner

G00fY2 commented Jun 22, 2021

Hi @dmalukov
sorry I misunderstood your question in my previous comment.

You basically like to have an option to validate the content of a result right inside the scanner activity, right? I know that it's not ideal to check the result after the scanner activity finished.

I am not really sure what the best option would be, since we can't reference or pass in logic when launching an activity.

I thought about offering a regex validator. Do you think this would be sufficient?

@dmalukov
Copy link
Author

@G00fY2
Unfortunately no, for we have to make validation via network request.

@G00fY2
Copy link
Owner

G00fY2 commented Jun 23, 2021

@dmalukov
Hm, then I see no way to achieve this with the current activity approach.

My goal is to someday create a fragment based implementation. So you could include the scanner inside your own activity.

@dmalukov
Copy link
Author

dmalukov commented Jun 23, 2021

A fragment might solve our problem indeed.
Anyway, thanks for your help.

@G00fY2
Copy link
Owner

G00fY2 commented Jun 24, 2021

I will close this issue and create a separate feature-request ticket for a fragment based implementation.

If you heavily rely on the QR scanning feature it's maybe worth to build the CameraX and ML Kit integration by yourself. This library should be an easy starting point. Anyway thanks for your input!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed improvement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants