Q:

Install Barcode Scanner

Friends i am trying to develop a barcode scanner.
Working flow is as:
When user click on scan button, it should capture image of barcode , scan this image and show the result:
Problem is, when i click on scan button getting a message "install barcode scanner"
I don't want to use this approach.
What to change in my code????, here is my code.
    IntentIntegrator integrator = new IntentIntegrator(BarcodeScanner.this);
    integrator.initiateScan();

    scan_btn = (Button)findViewById(R.id.Barcode_Scan_Button);
    scan_btn.setOnClickListener( new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub
            Intent scanIntent= new Intent("com.google.zxing.client.android.SCAN");
            scanIntent.putExtra("SCAN_MODE", "QR_CODE_MODE");

            startActivityForResult(scanIntent, 0);

        }
    });
}

public void onActivityResult(int requestCode, int resultCode, Intent intent) {
      IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);
      if (scanResult != null) {
          result_text.setText(intent.getStringExtra("SCAN_RESULT"));
      }
      else
          result_text.setText("Scan cancelled.");

    }

}

A:

There is nothing to change, you are calling an external BarcodeScanner application, namely the ZXing app. If it isn't present on your device, it will prompt you to install it.
If you don't like this behaviour, then you can either try writing your BarcodeScanner logic, or integrate the ZXing code in your application since it's open source, however I advice you not to do that, becuase that is not the purpose of the ZXing project.

