How to add the Zxing project to an android project that ive been already working on?

439 views
Skip to first unread message

Sadir Omer

unread,
Sep 5, 2015, 9:26:40 PM9/5/15
to zxing
Hi, I downloaded Zxing project from : https://github.com/zxing/zxing and I opened it through Android Studio. But I have no clue how it works. What i want to do is to create a QR Code scanning app, so how do suggest i add the zxing library to the project i've been working on?? (I'm new to Android)

Thank You

Lachezar Dobrev

unread,
Sep 7, 2015, 5:07:34 AM9/7/15
to Sadir Omer, zxing
  You shouldn't!
  Instead take a look at the Scanning Via Intent integration style.

[1] https://github.com/zxing/zxing/wiki/Scanning-Via-Intent

2015-09-06 4:26 GMT+03:00 Sadir Omer <sadi...@gmail.com>:
Hi, I downloaded Zxing project from : https://github.com/zxing/zxing and I opened it through Android Studio. But I have no clue how it works. What i want to do is to create a QR Code scanning app, so how do suggest i add the zxing library to the project i've been working on?? (I'm new to Android)

Thank You

--
You received this message because you are subscribed to the Google Groups "zxing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zxing+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Sadir Omer

unread,
Sep 7, 2015, 6:07:56 AM9/7/15
to zxing, sadi...@gmail.com
The thing is, I want to integrate a QR scanner in the app. Not use intent and scan via another app. Do you know what I should do in that case?

Lachezar Dobrev

unread,
Sep 7, 2015, 7:32:27 AM9/7/15
to Sadir Omer, zxing
  This is a significantly taller order.
  It's not really trivial. The variety of unfulfilled requests about camera orientation, camera api change and the occasional problems with some devices are a real-life demonstration of the challenges. Even making things work on devices that may or may not have an auto-focus feature is challenging.

  If you still insist on challenging yourself with this task you should know, that you do not need the Android application, but rather the core project only as a library (.jar library, not an android library). Afterwards you should read the Android code and learn from it: how to manage the camera, how to handle incoming camera frames, etc. The Android application is not a library, and is not (to the best of my knowledge) intended to be used as a 'gut-and-paste' quick-start.

  If you're intended on developing against Android Lolipop you should start from scratch, since the Camera API used by ZXing has been deprecated.
  There is also an alternative way to scan for bar-codes in Android M as pointed by the principal developer of the project: https://developers.google.com/vision/barcodes-overview

2015-09-07 13:05 GMT+03:00 Sadir Omer <sadi...@gmail.com>:
The thing is, I want to integrate a QR scanner in the app. Not use intent and scan via another app. Do you know what I should do in that case?

Lachezar Dobrev

unread,
Sep 7, 2015, 7:34:36 AM9/7/15
to Sadir Omer, zxing
  Apologies!
  The https://developers.google.com/vision/barcodes-overview does not require Android M, or at least it says that 2.3 is required in 'Get Started'.

Sadir Omer

unread,
Sep 7, 2015, 11:52:05 AM9/7/15
to zxing, sadi...@gmail.com
Thanks a lot for the info.

What i'm doing now is my FYP in Uni. The main target in that is to generate and stream QR codes and then detect it using another smartphone. So, if I can do that task only through my phone, that will be enough. So, i have no option but to integrate the QR code scanning library to the app that i'm creating.

Can you suggest me, what is the better option. To use zxing library or the Barcode API??
And how do i download the .jar file?

Thanks again for the response

Lachezar Dobrev

unread,
Sep 7, 2015, 11:59:36 AM9/7/15
to Sadir Omer, zxing
  Hmmm... I see.
  Streaming or continuous scanning is not achievable using the current ZXing Intent Integration.

  You might need to replicate how the ZXing manages the camera.
  ZXing is available in the central maven repository, so using it as dependency should be sufficient.
  The .jar can be obtained by running 'mvn package' in the 'core' sub-project, or directly downloaded from the maven repository (using http://mvnrepository.com/artifact/com.google.zxing/core for an instance).


Sadir Omer

unread,
Sep 7, 2015, 12:16:05 PM9/7/15
to zxing
All right.. I'll try that out and see.. If I have any questions regarding this, I'll post on the thread..
Thanks a lot of the help :D
Reply all
Reply to author
Forward
0 new messages