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

It takes lots of time and sometimes QRCode is not getting scanned #304

Closed
sana080 opened this issue Jun 8, 2017 · 15 comments
Closed

It takes lots of time and sometimes QRCode is not getting scanned #304

sana080 opened this issue Jun 8, 2017 · 15 comments

Comments

@sana080
Copy link

sana080 commented Jun 8, 2017

Description of the problem:

I am using for scanning QRCode but it is not getting scanned and when it is then it takes lots of time

Which library version are you using? 3.5.2

**Which phone/tablet are you using, and which Android version does it run?
. Moto G, Android 5.1

Does the same happen on other devices or an emulator?
Tested in MotoG and Samsung J2

@Adikso
Copy link

Adikso commented Jun 8, 2017

I am also having this problem on Nexus 5, Android 6.0

@deathnopool
Copy link

having the same problem on android n

@Nerkritus
Copy link

Nerkritus commented Jun 20, 2017

Also experiencing this on Motorola G Play, Android 6.0.1

Library version 3.5.0.

@aitbaali
Copy link

any solution @journeyapps?

@rkistner
Copy link
Member

@aitbaali No solution yet. Could be related to the target SDK version of the app, but haven't confirmed yet.

@Nerkritus
Copy link

Nerkritus commented Jun 21, 2017

@rkistner I'm targeting Marshmallow (23) in my app with minimum SDK set to Kit Kat (19).

I also recently installed the Feb 2017 security patches if that helps.

@pawelantczak
Copy link

pawelantczak commented Jun 22, 2017

Same with targetSdkVersion 25

@eligiobz
Copy link

eligiobz commented Jul 1, 2017

Same problems on Samsung J7 and targetSdkVersion 23

@Nerkritus
Copy link

I've noticed this is only affecting my app in debug. When I run the release from the play store on the problem device, QR code scanning works fine.

So perhaps it's not such a big deal.

@letitfly
Copy link

+1 same here. Android 5.1, HTC One.

@sana080
Copy link
Author

sana080 commented Aug 2, 2017

@Nerkrotus : Agree
Working comparatively better and fast when not running in debug mode

@aitbaali
Copy link

aitbaali commented Mar 17, 2018

It worked fast and better for me when I change the size of the barcodeview to a small size (in my case: W500 & H300 on a tablet) and turn the torch on.

barcodeScanner is an instance if DecoratedBarcodeView
barcodeScanner.getBarcodeView().setFramingRectSize(new Size(width, height));

if (hasFlash()) {
            barcodeScannerFid.setTorchOn();
}

 /**
     * Check if the device's camera has a Flashlight.
     *
     * @return true if there is Flashlight, otherwise false.
     */
    private boolean hasFlash() {
        return getApplicationContext().getPackageManager()
                .hasSystemFeature(PackageManager.FEATURE_CAMERA_FLASH);
    }

see https://github.com/journeyapps/zxing-android-embedded/blob/50e3acce091decc195f67e6079b86427ddc2ad60/sample/src/main/java/example/zxing/CustomScannerActivity.java

@rkistner rkistner changed the title It takes lots of time and sometimes ORCode is not getting scanned It takes lots of time and sometimes QRCode is not getting scanned Mar 22, 2018
@ismdcf
Copy link

ismdcf commented Oct 23, 2018

Had the same issue when trying to give a custom random size and then figured out the aspect ratio plays a major role in the qr code readability.

Following size worked for me
240dp height
320dp width

and if setting the value to a larger screen size multiplying the value by integer gave good readability.
480dp height
640dp width

@xxss0903
Copy link

xxss0903 commented Dec 4, 2018

before Detector to detect the QRCode bitmatrix, i found if bitmatrix.rotate180() can improve the scan effective.

@rkistner
Copy link
Member

rkistner commented Sep 8, 2019

Debugger mode will make scanning slower - always test performance without a debugger connected.

For the other reports here there is not enough info to debug.

@rkistner rkistner closed this as completed Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests