Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal for decoding of GS1 compliant datamatrix codes #18

Closed
wants to merge 6 commits into from

Conversation

mrab
Copy link

@mrab mrab commented Nov 3, 2013

Hi together,

I often scan GS1 compliant datamatrix codes with zxing (which is lovely, btw.). Unfortunately they were not decoded into the different application identifiers (with their values).

I added a parser to decode and format the content. The major changes are in the core library.
I'm a bit uncertain if decoding countries and currencies from the three digit iso codes is a good idea, as they are more or less likely to change.

If the code lacks of further tests or needs some tweaking to meet your quality standards, please let me know. Unfortunately I formatted the core\pom.xml what messed it up a bit in the diff :-(.

Cheers,

Melchior

PS: I noticed that your primary repo is a google svn. I don't have a google login (and it's not likely I'll have one in the future), so I'm not able to commit the patch there.

@srowen
Copy link
Contributor

srowen commented Nov 3, 2013

This is a "read-only" mirror -- patches should be against SVN and be posted at code.google.com/p/zxing.
This is not usable to the project as it stands -- it's making a new app, changing the UI, adding binaries (?) etc.
If we can distill this down to something a lot more isolated -- parsing in core/, modest change to display in android/ -- it might be possible to merge this. In any event the place to proceed is at code.google.com/p/zxing

@srowen srowen closed this Nov 3, 2013
@mrab
Copy link
Author

mrab commented Nov 4, 2013

Hi Sean,
please find my comments below:

  • There is no need to make a new app. This was only neccessary as the deployment was complaining "There is already a barcode Scanner app on your phone".
  • The only changes in the android/ are:
    • Adding some lines to com.google.zxing.client.android.result.supplement.SupplementalInfoRetriever to hook in the GS1 decoding
    • Adding com.google.zxing.client.android.result.supplement.GS1DisplayDeletgate
    • Adding some lines in the preferences
  • parsing is already done completely in /core. Only the formatting is done in the displayDelegate (using /core)
  • If you hesitate to add Takahiko Kawasakis (Apache 2.0 licensed) library to decode the ISO 3166 country codes, I don't mind to remove it. As I wrote before I see the difficulty to maintain currency and country mapping as they are more or less likely to change.

If you see a way to provide a patch without creating a google account, I'll be happy to do so.

Cheers,

Melchior

@srowen
Copy link
Contributor

srowen commented Nov 4, 2013

OK, best thing to do is boil this down to a commitable patch for
code.google.com/p/zxing. If you don't want to sign up you can email me a
patch.

Points 2 and 3 are fine. I would rather not include a new library just for
country codes. I'd probably just include the few bits of relevant source
code.

On Mon, Nov 4, 2013 at 7:28 PM, mrab notifications@github.com wrote:

Hi Sean,
please find my comments below:

  • There is no need to make a new app. This was only neccessary as the
    deployment was complaining "There is already a barcode Scanner app on your
    phone".
  • The only changes in the android/ are:
    • Adding some lines to
      com.google.zxing.client.android.result.supplement.SupplementalInfoRetriever
      to hook in the GS1 decoding
    • Adding
      com.google.zxing.client.android.result.supplement.GS1DisplayDeletgate
    • Adding some lines in the preferences
      • parsing is already done completely in /core. Only the formatting is
        done in the displayDelegate (using /core)
  • If you hesitate to add Takahiko Kawasakis (Apache 2.0 licensed)
    library to decode the ISO 3166 country codes, I don't mind to remove it. As
    I wrote before I see the difficulty to maintain currency and country
    mapping as they are more or less likely to change.

If you see a way to provide a patch without creating a google account,
I'll be happy to do so.

Cheers,

Melchior


Reply to this email directly or view it on GitHubhttps://github.com//pull/18#issuecomment-27714767
.

@mrab
Copy link
Author

mrab commented Nov 9, 2013

I prepared a patch based on revision 2908. You can download it here: http://mrab.de/wp-content/uploads/GS1-decoding.patch.tar.gz

The lib is removed and replaced by two enums listing currencies and countries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants