tags:

views:

423

answers:

2

Hi

I want to integrate the zxing source code to my android application. I have downloaded the zxing1.5 and integrate the whole code to my application and i am calling the activity "CaptureActivity" through intent. It is showing only the camera view but it is not scanning the barcode. Can u please tell me how to solve this problem because i want my application to be stand alone. i don't want to install BarcodeScanner.apk separately in the device.

thanks in advance....

+3  A: 

I don't think CaptureActivity is what you want - instead, you should be using com.google.zxing.client.android.SCAN.

See the article How to scan a barcode from another Android application via Intents for code samples, and links to further related articles.

RichieHindle
Thanks for your quick reply but i don't want to call the "BarcodeScanner.apk" that has been already installed in the device. I want my application to be stand alone .So i want to integrate the zxing android code to my application.hope you can understand.Thanks
Sujit
@Sujit: Ah, I see. Then I guess you need to merge the original ZXing XML file with yours, but change `com.google.zxing.client.android.SCAN` to `com.sujit.zxing.client.android.SCAN` or similar, and then fire an intent for `com.sujit.zxing.client.android.SCAN`.
RichieHindle
original ZXing XML means AndroidMainefest.xml or what.thanks...
Sujit
Yes, AndroidManifest.xml. Specifically the part that says `<activity android:name=".CaptureActivity" ... > ... <intent-filter><action android:name="com.google.zxing.client.android.SCAN"/>`
RichieHindle
Ok i got it...let me test it on deviceThanks..
Sujit
No its not working. I have changed the AndroidMainefest.xml and provide the package name as you have specified still it is not scanning at all. I am not getting it why it is not scanning. The BarcodeScanner android code is working fine and it is calling the CaptureActivity by intent but when i am calling the same activity in my application it is not scanning.Thanks...
Sujit
If you've changed everything to refer to your own package, and left everything else the same, then I'm afraid I don't know why it's not working.
RichieHindle
A: 

hi, have you sorted out this problem ? am also facing the same problem, please share it with me what you have done.

thanks & regards sathees

sathees