journeyapps / zxing-android-embedded

Barcode scanner library for Android, based on the ZXing decoder
https://journeyapps.com/
Apache License 2.0
5.73k stars 1.27k forks source link

Taking too much time to scan + setAutoFocus true/false using IntentIntegrator #624

Open pratikbutani opened 3 years ago

pratikbutani commented 3 years ago

Description of the problem:

I am getting two problems as follow:

  1. I am scanning QR codes using the following code but it's taking too much time to scan. Is there anything to change?
  2. I am thinking to change Auto Focus true/false to check maybe it's happening because of autofocus.

Which library version are you using? E.g. 3.2.0.

implementation('com.journeyapps:zxing-android-embedded:4.2.0') { transitive = false }
implementation 'com.google.zxing:core:3.4.1'

Which phone/tablet are you using, and which Android version does it run? (e.g. Samsung Galaxy S5, Android 5.0) Samsung Galaxy J8

Does the same happen on other devices or an emulator? Not checked

Can you reproduce the issue in the sample project included with the library? If not, can you provide your own sample project or sample code that produces this error?

IntentIntegrator intentIntegrator = new IntentIntegrator(MainActivity.this);
intentIntegrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE);
intentIntegrator.setOrientationLocked(true);
intentIntegrator.setPrompt("Scan a QR code");
intentIntegrator.setBeepEnabled(true);
intentIntegrator.setCameraId(0);
intentIntegrator.setBarcodeImageEnabled(true);
intentIntegrator.initiateScan();

In the case of an error do you have a stack trace or ADB logs?

AvroNill commented 3 years ago

Same here scan is delayed because of auto focus