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

Android barcode module #4

Closed
wants to merge 12 commits into from
Closed

Android barcode module #4

wants to merge 12 commits into from

Conversation

pfleidi
Copy link

@pfleidi pfleidi commented Sep 17, 2010

Hi,

we just committed some changes to the titanium mobile SDK for android and added a barcode module based on the zxing library. It's licensed under the Apache 2.0 license.

You can use it just like that:

var win = Titanium.UI.currentWindow;

Titanium.Barcode.scan({
  success:function(data) {
    if(data && data.barcode) {
      var label = Titanium.UI.createLabel({
        text:'Barcode: ' + data.barcode,
        textAlign:'center',
        width:'auto'
      }); 

      win.add(label);
    } else {
      alert(JSON.stringify(data));
    }   
  },  

  error:function(err) { 
    alert("Error!! " + err); 
  },  

  cancel:function() { 
    alert("cancel"); 
  }
});

@StephenJohnson
Copy link

Didn't want to wait for it to be pulled into the master - works great with 1.4.2 and exactly what I needed. Thanks!

pingwang2011 pushed a commit to pingwang2011/titanium_mobile that referenced this pull request Jan 10, 2012
TIMOB-6678 - TableView left and right image are inefficient and can access null DOM nodes
jpl-mac referenced this pull request in jpl-mac/titanium_mobile Mar 22, 2012
Initial modifications of titanium.py script to add blackberry support
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants