how to capture data from qr scanner using zxing
<p>I am developing an application and a part of that involves QR scanning. After a lot of research I was successful in developing a stand alone scanning app. When a user opens the scanner and scans a particular QR code, he gets some value, e.g. a URL. Now I want to store the data acquired on scanning into my android code. Can anybody help me how do i go about it?</p>

<p>From what I can see, I need to work with capture activity class of Zxing. However, I am not sure what exactly needs to be done. All the blogs that I read online direct me to use an <code>Intent</code> to call barcode scanning. However, the purpose of my app is not to just scan the products. I need to store the information of the scanned product and later use it for some other purpose.</p>

<p>Kindly help me.</p>

<p>Thanks,
Amey</p>

<p>Here is the code from Zxing.. this is the main activity that deals with all the scanning. to what i have learnt by reading online, i need to capture the data returned when a barcode is scanned..</p>

<pre><code>public void onActivityResult(int requestCode, int resultCode, Intent intent) { 
    if (resultCode == RESULT_OK) { 
        if (requestCode == HISTORY_REQUEST_CODE) { 

            int itemNumber = intent.getIntExtra(Intents.History.ITEM_NUMBER, -1); 

            if (itemNumber &gt;= 0) { 
                HistoryItem historyItem = historyManager.buildHistoryItem(itemNumber);             
                decodeOrStoreSavedBitmap(null, historyItem.getResult()); 
            } 
        }
    } 
} 


if (Intents.Scan.ACTION.equals(action)) { // Scan the formats the intent requested, and   return the result to the calling activity 
    source = IntentSource.NATIVE_APP_INTENT; 

    decodeFormats = DecodeFormatManager.parseDecodeFormats(intent); 
    if (intent.hasExtra(Intents.Scan.WIDTH) &amp;&amp; intent.hasExtra(Intents.Scan.HEIGHT)) {

        int width = intent.getIntExtra(Intents.Scan.WIDTH, 0); 
        int height = intent.getIntExtra(Intents.Scan.HEIGHT, 0); 

        if (width &gt; 0 &amp;&amp; height &gt; 0) { 
            cameraManager.setManualFramingRect(width, height); 
        } 
    }
}
</code></pre>
