0

I want to integrate zxing code in my application. I do not want to install barcode scanning application separately on device. I have downloaded zXing1.6. I have gone through many posts and forums but unfortunately have not succeeded. Please tell me the steps required to achieve this.

jengelsma
  • 8,192
  • 4
  • 21
  • 21
Pooja M. Bohora
  • 1,311
  • 1
  • 14
  • 42

1 Answers1

0

You can simply use the code provided by zxing and then call the barcode reader activity using startActivityForResult, after scanning it will return you the barcode in data object(of Intent type) under onActivityForResult function.

mudit
  • 25,306
  • 32
  • 90
  • 132
  • Hello mudit, Yes I kknow that I will have to call startActivityForResult. But when I create intent like Intent intent = new Intent("com.google.zxing.client.android.SCAN"); intent.setPackage("com.google.zxing.client.android"); intent.putExtra("SCAN_MODE", "QR_CODE_MODE"); intent.putExtra("SCAN_MODE", "ONE_D_MODE"); intent.putExtra("SCAN_MODE", "PRODUCT_MODE"); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); It gives me exception that no activity found for this package. Please help me. :( – Pooja M. Bohora Apr 15 '11 at 04:31
  • No one has answer for this? Please help... – Pooja M. Bohora Apr 18 '11 at 04:08
  • If the user does not have Barcode scanner installed then the intent will not find it. – dbaugh Jun 03 '11 at 16:57
  • No we can do it without having installed barcode application on device. – Pooja M. Bohora Jun 07 '11 at 06:40