Credntia / MVBarcodeReader

A Barcode scanner library for Android. Uses the Google Play Services' mobile vision api for barcode detection.
Apache License 2.0
68 stars 22 forks source link

Continue capturing #12

Closed jemshit closed 7 years ago

jemshit commented 7 years ago

Hi, how do i continue capturing barcodes after it has captured the barcode and showing the preview? I'm using BarcodeCaptureFragment, SINGLE_AUTO mode. I couldn't find any method in that Fragment to continue camera capture

iamMehedi commented 7 years ago

There is no way to infinitely scan for barcodes. In MULTIPLE mode the library will continue to scan and detect barcodes until user taps on the screen. You can achieve it by extending the BarcodeCaptureFragment and overriding void onBarcodeDetected(final Barcode barcode).

jemshit commented 7 years ago

Something like this: https://github.com/dm77/barcodescanner/blob/master/zxing-sample/src/main/java/me/dm7/barcodescanner/zxing/sample/SimpleScannerFragment.java#L43

iamMehedi commented 7 years ago

As I told earlier, you can do that by extending the BarcodeCaptureFragment and overriding void onBarcodeDetected(final Barcode barcode) and public boolean onTouch(View v, MotionEvent event). You won't be able to stop the detection/frame processing though, if you must do that then you'll need to modify CameraSource