0

I am running my own application on "Samsung Y" which launches ZXing when triggers button,I don't know how to see details of barcode scanned.

Please someone help me

2 Answers2

1

when you want to call ZXing you put this

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

Then you make an onActivityResult to capture the result from ZXing

public void onActivityResult(int requestCode, int resultCode, Intent intent) {
    if (requestCode == 0) {
        if (resultCode == RESULT_OK) {
            // The actual code result 
            String contents = intent.getStringExtra("SCAN_RESULT"); 
            // Type of barcode scanned (Barcode, QR, etc.)
            String format = intent.getStringExtra("SCAN_RESULT_FORMAT"); //
    }
}

You could also use their intentIntegrator

Flexo
  • 2,506
  • 3
  • 21
  • 32
0

There are many similar questions. Check my answer here: How to use Zxing in android if u want to save history intent.putExtra("SAVE_HISTORY",true); instead of false

Community
  • 1
  • 1
Seshu Vinay
  • 13,560
  • 9
  • 60
  • 109