1

I am developing an app in which i have to use Barcode Scanner to scan Barcode and after lot of search i got the following code:

 Intent intent = new Intent("com.google.zxing.client.android.SCAN");

With the help of this code , user can implement barcode scanner of Zxing but i want to implement my barcode scanner programmatically that is i don't want a third party application. I used Integrating the ZXing library directly into my Android application link to make standalone barcode scanner but i don't know what to do after making core.jar Kindly help me to integrate barcode scanner. Any help will be appreciated.. Thanks in advance

Community
  • 1
  • 1

1 Answers1

2

Launch activity for result instead or just the convenience code for this:

IntentIntegrator integrator = new IntentIntegrator(yourActivity);
integrator.initiateScan();

and have this method to receive the result:

public void onActivityResult(int requestCode, int resultCode, Intent intent) {
  IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);
  if (scanResult != null) {
    // handle scan result
  }
  // else continue with any other code you need in the method
  ...
}

Please refer to this link for more information:

http://code.google.com/p/zxing/wiki/ScanningViaIntent

Mattias Isegran Bergander
  • 11,811
  • 2
  • 41
  • 49
  • 1
    Can you please look at http://stackoverflow.com/questions/4782543/integration-zxing-library-directly-into-my-android-application and tell me what to do after core.jar for standalone barcode scanner –  Jan 03 '13 at 04:33
  • What I have seen from above method it ask to install one more application from play store and user775 had clearly mentioned `i don't want a third party application`. – Android Apr 30 '13 at 06:41