Zxing Barcode scanner integrated external barcode scanner app


Staff member
I'm trying to integrate the zxing barcode scanner into my app.
Everything went as planed, only if I click on scann, it asks me to choose from the integrated or the external.
Who can I avoid this question?

To the project:
I didn't import it as library, I placed all the java code files into the project.
this was one of the requirements that we have.
We don't want the app to be dependend on any external resources (even if they are only ide internal)

I also tested it on an android device, that doesn't have the zxing barcode scanner.
There no question is asked.

How can I buypass this question and point strait at the internal version?

Here's the code on calling it:

button2.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v) {
            Intent intent = new Intent("com.google.zxing.client.android.SCAN");
            intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
            startActivityForResult(intent, 0);

I also tried to find that com.google.zxing.client.android.SCAN class but couldn't find it.
But the funny thing is, it works.

Here's the part of the manifest:

    <activity android:name="com.google.zxing.client.android.CaptureActivity"
          <action android:name="android.intent.action.MAIN"/>
          <category android:name="android.intent.category.DEFAULT"/>
          <action android:name="com.google.zxing.client.android.SCAN"/>
          <category android:name="android.intent.category.DEFAULT"/>

On the integration code I followed this:

<a href="http://damianflannery.wordpress.com...into-your-android-app-natively-using-eclipse/" rel="nofollow">http://damianflannery.wordpress.com...into-your-android-app-natively-using-eclipse/</a>

I don't really know what I did wrong.