Restart qreader?
See original GitHub issueHello there, thanks for this great QR reader!
I wonder if its possible to restart the qreader object after call .stop() on it.
For example: On the onDetect listener, after I detect something, I show a Dialog and call qreader.stop()
qrEader = new QREader.Builder(this, surfaceView, new QRDataListener() {
@Override public void onDetected(final String data) {
Log.d("QREader", "Value : " + data);
surfaceView.post(new Runnable() {
@Override public void run() {
showDialog(data);
}
});
qrEader.stop(); <------------------------------------- HERE
}
}).build();
qrEader.init();
So when I dismiss my Dialog I call qreader.start() but it doens’t read the qrcode anymore
private void showDialog(String qrcode) {
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
builder.setTitle("Confirmar convidado?");
builder.setMessage(qrcode);
String positiveText = getString(android.R.string.ok);
builder.setPositiveButton(positiveText,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
System.out.println("OK");
surfaceView.post(new Runnable() {
@Override public void run() {
qrEader.start(); <------------------------- HERE
}
});
}
});
String negativeText = getString(android.R.string.cancel);
builder.setNegativeButton(negativeText,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
System.out.println("CANCEL");
qrEader.start(); <-------------------------------- HERE
}
});
AlertDialog dialog = builder.create();
dialog.show();
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
nisrulz/qreader: [Android Library] Read QR codes ... - GitHub
Android library which makes use of Google's Mobile Vision API to enable reading QR Code. The library is built for simplicity and ease...
Read more >Restarting the event collection service - IBM
There might be situations when you want to restart only the event collection service across all managed hosts in your IBM QRadar environment....
Read more >Qreader | Online QR Code Reader
Scan your QR Code ; Use your camera to decode the QR Code image, Upload your QR code image file ; drag and...
Read more >[Updated] QReader - QR Code Reader app not working (down ...
Try to restart your iPhone / iPad. Press the power off button for few seconds and then choose restart from the menu to...
Read more >QREader (library API) - javadoc.io
Constructor Detail. QREader. public QREader(). Method Detail. start. public static void start(android.content.Context context, android.view.
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
@punksta provided a fix which is merged into the
develop
branch and should be released soon. Closing this.Guys, I haven’t got time to fix it lately but I will update it within this week. Meanwhile if anyone else get a change to take a dig at it , then please send a PR.