0

I've been able to add ZXing by simply adding the dependency in my gradle file, however this doesn't let me edit the code of ZXing.

I'm wanting to access the 2d boolean array that is passed to the Decoder class in ZXing core directory, however to do this I need to edit the code directly.

I tried adding ZXing Core as a module, but as it has no gradle files I could not.

How can I integrate ZXing in this way? (i.e. in such a way that I can edit the files of the library)

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
numberjak
  • 1,065
  • 4
  • 13
  • 28
  • you can add at is library project.for adding library project follow this .https://stackoverflow.com/questions/25610727/adding-external-library-in-android-studio – Hardik Mehta Jul 05 '17 at 12:30
  • So I tried what you said: I downloaded the zxing core jar file, added it to my libs folder, then added it as a library for the project. That all worked fine HOWEVER I still can't edit the files within the jar file. I can see them all, but they all have a little padlock on them. Any ideas? – numberjak Jul 05 '17 at 12:55
  • maybe they do want to allow such editing that's why they have padlock, although if you can tell what you want to achieve we can find other libraries. – Hardik Mehta Jul 05 '17 at 13:09
  • So part of the process of scanning in a QR code is to represent the 2d grid of black and white squares as something tangible on the computer. ZXing uses a 2d array of boolean values, where white squares are represented as 'false' and black squares as 'true'. Then scanner will then decode this 2d array of boolean values to give you the actual value encoded in the qr code. What I want is to access this digital representation of the QR code (2d array of boolean values) so that I can edit some of the squares. – numberjak Jul 05 '17 at 13:38
  • I think I've finally sorted it! Thanks so much for your help though – numberjak Jul 05 '17 at 13:55

1 Answers1

0

In case anyone has the same problem as me, I had to download the source files for ZXing core, create a new android studio project using those downloaded source files, make sure that project compiled smoothly on its own, then in my actual project, I added to the dependencies section of my cradle file:

compile project(":ZXINGPROJECTNAME")

Don't leave out that colon. Worked fine after that

numberjak
  • 1,065
  • 4
  • 13
  • 28