I use Zxing to scan a bar code in Android
Button button = (Button) this.findViewById(R.id.scan);
button.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
IntentIntegrator.initiateScan(AntennaShow.this);
}
});
When I touch the button,I see a popup menu,which has Zxing and other bar-code-scan apps I installed before
Question:
How can I touch the button then automatically run the Zxing because 1,I need to use the Zxing to retrieve information I scanned 2,that can be troublesome for users to choose the apt app–Zxing
The easiest thing to do is to use the
IntentIntegratorclass supplied with the project. See http://code.google.com/p/zxing/wiki/ScanningViaIntentIt will handle restricting to the Barcode Scanner or Barcode Scanner+ packages by default.