How can I read QR code once and stop QrReader
See original GitHub issueAs in the examples, the QREeader reads continous. When I once read
qreader = QREader.Builder(view.context, surface_view, QRDataListener { data ->
printReadQrCode(data)
}).facing(QREader.BACK_CAM)
.enableAutofocus(true)
.height(surface_view.height)
.width(surface_view.width)
.build()
}
Here it prints continueous the read data object as long as I hold the scanner to the qr code. I would like to call printReadQrCode(data) only once it was read successfully… then stop the qreader and resume if required.
also
myTextView.post(new Runnable() {
@Override
public void run() {
myTextView.setText(data);
}
});
wont help, since I do not have any Views and I do not want to add artificially some View elements…
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
How to Enable or disable Scan QR Code from Internet app ...
No need to download a QR code scanner on the Galaxy S8,S9, Note 8 and other similar devices as there is one built...
Read more >How to stop once QR code is scanned? - Stack Overflow
1 Answer 1 ... Just set result and call finish when your scan is completed in that activity. After that you need to...
Read more >How to scan QR Codes with Android phones without an app
Need to know how to scan QR Code menus? Pull up the native camera and point it at the QR Code. The menu...
Read more >How to scan a QR code on your Android phone or tablet
To scan QR code on Android, open the Camera app and position the QR code within the frame. If that doesn't work, you...
Read more >Troubleshoot QR code scanning with your phone's camera
You'll usually need to scan a QR code when setting up a Nest product with the app. If your phone or tablet's camera...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
private void SetupQREader() { qrEader = new QREader.Builder(this, id_SurfaceView, new QRDataListener() { @Override public void onDetected(final String data) { Log.d(“QREader”, "Value : " + data);
still getting Log two times ? why ? not understanding. and what is the use of qrEader.wait(); and how do i use and where to use?
call
qReader.stop()
after first scan. and useqReader.start()
when need to start scanning again.