Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Adding 5.0 version of barcode scanner #3

wants to merge 8 commits into from

5 participants


No description provided.


Hi Jeff,

Can we also engage Ken with the inclusion of the Zebra X'ings libraries. I believe he has started this work as well for the Tablet OS.

Just making sure we have all the right t's crossed and i's dotted.



This looks good, and complete, if a little busy. My comments are related largely to modularizing the code a bit better to improve readability and maintenance.

General nitpicks:

  • please check the line spacing as it is inconsistent in all files
  • when checking a variable against a constant, use CONSTANT.equals(variable) to avoid NPEs

Specific comments:
1) BarcodeExtension - there shouldn't be two if statements checking the same thing in the loadFeature method. I also recommend breaking down the code that checks and sets permissions into two helper methods (getMissingCameraPermissions and allowMissingCameraPermissions) to improve readability.

2) GenerateBarcodeAction - I think that the invoke method can be broken down into several pieces to improve readability. I suggest keeping the the parameter checking in invoke and assigning the parameters to the contents, generatedCallback, errorCallback and options objects directly as you're checking them. The runnable can be a separate private class. Invoke can process, break down and send the options object to the class' constructor to make the dependencies clear.

Its run method does several things - processes args, converts a string representation of the barcode to a byte array and processes files to write it. I recommend separating those steps into smaller methods so that the run method reads like pseudo-code. The helpers can take care of the details for whoever is interested in scrolling down and digging deeper.

3) ScanBarcodeAction - same comments as above. It's one busy invoke method that can be broken down to improve readability.


Checking to see if this pull request simply fell off the table, or if there is a reason why it has not yet been merged.

It looks like Jeff addressed Alex's concerns. Is there anything else left to do before we can add this change?


Pull request no longer merges cleanly. I'll ping offline to see if we can close this, or whether @jeffheifetz should update it


Closing after talking with @astanley

@pelegri pelegri closed this
@t470520 t470520 referenced this pull request from a commit in t470520/WebWorks-Community-APIs
@t470520 t470520 #3 sameple files update again
remove all LICENCE file, replace with plain text files. Update index.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 8, 2011
  1. Adding 5.0 version of barcode scanner

    Jeffrey Heifetz authored
Commits on Aug 17, 2011
  1. Edited Smartphone/Barcode/ via GitHub

    Jeffrey Heifetz authored
Commits on Aug 18, 2011
  1. Updating library.xml for new architecture

    Jeffrey Heifetz authored
  2. Updating install instructions based on single library.xml

    Jeffrey Heifetz authored
  3. Adding missing id attribute to extension

    Jeffrey Heifetz authored
Commits on Aug 25, 2011
  1. Initial changes based on ababut's review

    Jeffrey Heifetz authored
  2. finishing changes for ababut's review

    Jeffrey Heifetz authored
  3. Updating library.xml for differences between 5.0 and 6.0 and correspo…

    Jeffrey Heifetz authored
    …nding install instructions
Something went wrong with that request. Please try again.