title: Decoding bitmap using Zxing library in android
body: <p>I am integrating the zxing library to scan the barcode to my android app. I am doing this local to my application as illustrated in </p>
  
  <p><a href="http://code.google.com/p/zxing/source/browse/trunk/androidtest/src/com/google/zxing/client/androidtest/ZXingTestActivity.java" rel="nofollow noreferrer">http://code.google.com/p/zxing/source/browse/trunk/androidtest/src/com/google/zxing/client/androidtest/ZXingTestActivity.java</a></p>
  
  <p>But while running the app, it asks me to install the Barcode scanner app. Is it not possible to achieve this without installing of the app?</p>
  
  <p>I have done a lot of research on how to achieve this, but I could not end up with satisfactory results.</p>
  
  <p>I am trying to do this using this piece of code,</p>
  
  <pre><code>      IntentIntegrator integrator = new IntentIntegrator(TestActivity.this);
        integrator.addExtra("SCAN_WIDTH", 800);
        integrator.addExtra("SCAN_HEIGHT", 200);
        integrator.addExtra("RESULT_DISPLAY_DURATION_MS", 3000L);
        integrator.addExtra("PROMPT_MESSAGE", "Custom prompt to scan a product");
        integrator.initiateScan(IntentIntegrator.PRODUCT_CODE_TYPES);
  </code></pre>
  
  <p>Please help me</p>
  
  <p><strong>Update :</strong></p>
  
  <p>I am using a different technique of zxing to scan now i.e. to capture image with the camera and then decoding it. I am able to capture the image with this code, but after capturing, I am trying to decode the bitmap of captured image using LuminanceSource, RGBLuminanceSource etc classes. </p>
  
  <p>But the resulting binarybitmap,</p>
  
  <pre><code>    BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
  </code></pre>
  
  <p>appears to be null. </p>
  
  <p>Can anybody tell me why is this? I have seen many posts saying that is is working for them but it is not working for me. </p>
  
  <p>Can anybody please suggest me something.</p>
  
  <p>Here is the link I referred, I am using the exact code in the accepted answer </p>
  
  <p><a href="https://stackoverflow.com/questions/13803852/barcode-qr-code-reader-for-android/14826051#14826051">Barcode/Qr Code Reader for Android</a></p>