Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QR Code scanning android

I am using Zxing Barcode scanner app to scan bar codes using

Intent intent = new Intent("com.google.zxing.client.android.SCAN");
intent.putExtra("SCAN_MODE", "QR_CODE_MODE");

startActivityForResult(intent, 0);

It works fine. I could get the result in onActivityResult. No problem. I dont want QRCode to be displayed. I mean I don't want to let the end user know the qr code string. But in the history available in the original barcode scanner app, it is showing up the list of QR's scanned. So, how do i make the QRStringfrom my app invisible in History

like image 623
Seshu Vinay Avatar asked May 01 '26 10:05

Seshu Vinay


1 Answers

"SAVE_HISTORY" from package com.google.zxing.client.android.Scan;

 /**
     * Setting this to false will not save scanned codes in the history.
     */
    public static final String SAVE_HISTORY = "SAVE_HISTORY";

Then something like,

intent.putExtra("SAVE_HISTORY", false);

Try this and let me know what happen..

like image 52
user370305 Avatar answered May 03 '26 00:05

user370305



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!