• Stars
    star
    120
  • Rank 295,983 (Top 6 %)
  • Language
    Java
  • License
    Other
  • Created almost 14 years ago
  • Updated over 12 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

barcode scanner module for appcelerator titanium

Barcode Scanner For Appcelerator Titanium

This is a small barcode scanner module you can use together with Titanium Appcelerator on an Android device.

Build prerequisites

To build the module, there are some dependencies which need to be fulfilled:

  • Git
  • Titanium Mobile SDK 1.8.1 or above
  • Python >= 2.5
  • Sun Java SDK 6.0
  • Android SDK with Google APIs and SDK version 4 installed
  • Ant >= 1.7.1

Build the module

To build the module, you need to clone our git repository and build the sources with ant:

# clone the repository
git clone https://github.com/mwaylabs/titanium-barcode.git
cd titanium-barcode
# run ant to build the module
ant clean && ant

If the build fails, make sure the entries in the buld.properies file point to the right path:

titanium.platform=/Library/Application Support/Titanium/mobilesdk/osx/1.8.1/android
android.platform=/opt/android-sdk/platforms/android-4
google.apis=/opt/android-sdk/add-ons/addon_google_apis_google_inc_4

The newly created *.jar and *.zip files can be found in the dist directory. The module you need is called com.mwaysolutions.barcode-android-$VERSION.zip

Use the module

  • Build the module or download is from the download section
  • Place it into your appcelerator project directory
  • Add the module to the module section of your tiapp.xml file: com.mwaysolutions.barcode
  • Use it in your application with require('com.mwaysolutions.barcode');
  • Build your project as usual with the Titanium Developer application

The Scanner looks strange on devices with a high resolution screen?!

If the layout of the scanner activity is not centered, add the following entry to your tiapp.xml:

<android xmlns:android="http://schemas.android.com/apk/res/android">
    <manifest>
      <supports-screens
        android:smallScreens="true"
        android:normalScreens="true"
        android:largeScreens="true"
        android:anyDensity="true" />
    </manifest>
</android>

Code Example

var window = Ti.UI.createWindow({
    backgroundColor:'white'
});

var label = Ti.UI.createLabel();
window.add(label);
window.open();

var titaniumBarcode = require('com.mwaysolutions.barcode');

titaniumBarcode.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"); 
  }
});

More Repositories

1

The-M-Project

'The-M-Project' is a Mobile HTML5 Application Framework.
CSS
747
star
2

generator-m-ionic

Advanced workflows and setup for building rock-solid Ionic apps
JavaScript
672
star
3

flutter-apns

Flutter Plugin for Push notification servers
Dart
144
star
4

Espresso

The-M-Projects build tools using node.js.
JavaScript
84
star
5

The-M-Project-Sample-Apps

The-M-Project Sample Apps
JavaScript
67
star
6

generator-m-ionic-demo

A demo project generated with generator-m-ionic
JavaScript
27
star
7

titanium-barcode-example

A sample application using the titanium-barcode module
JavaScript
24
star
8

cordova-plugin-client-certificate

Client certificate authentication plugin for Cordova
Objective-C
16
star
9

bikini

Offline Synchronisation for Backbone (deprecated)
JavaScript
14
star
10

brackets-quick-require

JavaScript
11
star
11

cordova-plugin-inappbrowser

Java
9
star
12

fruitymesh-devenv

Development Environment for FruityMesh - saves you some trouble
HTML
8
star
13

bigbench.js

BigBench.js
JavaScript
7
star
14

relution-jenkins-plugin

A Jenkins plugin for the Relution Enterprise Appstore by M-Way Solutions GmbH
Java
7
star
15

mcap-cli

JavaScript
6
star
16

Sketch_Sir_Explain-A-Lot

A Sketch Plugin for explaining your awesome Designs (Alpha)
JavaScript
5
star
17

tslint-config-mway

A TSLint config for M-Way Typescript Style Guide
JavaScript
5
star
18

generator-themproject

Generator for The-M-Project 2.0
JavaScript
4
star
19

uikit

Ui toolbox to build single page web applications with Angular 1.x
JavaScript
4
star
20

flutter-zebra-datawedge

Java
3
star
21

update-manager

JavaScript
3
star
22

BlueRange-SDK-Android

Android SDK for interaction with Relution SmartBeacons
Java
3
star
23

mcapjs-client

JavaScript
2
star
24

cloud9mobile

Don't use this branch - there is nothing to see
JavaScript
2
star
25

relution-client-security

A Login/Logout Module for Relution LiveData. Works well with generator-m
JavaScript
2
star
26

android-maven-string-replacement

A showcase about howto replace a string inside /res/values/strings.xml via maven. A Use-case is handling the Google Maps API keys
Java
2
star
27

generator-m-server

JavaScript
1
star
28

angularjs-mcap-session

AngularJS module for session management with mCAP backends.
JavaScript
1
star
29

generator-appmobi

DEPRECATED! generator for appmobi integration into generator-m-ionic
JavaScript
1
star
30

JmDNS

fork of http://jmdns.sourceforge.net/
Java
1
star
31

Reboard-Proxy

Our reverse HTTP proxy for Reboard
JavaScript
1
star
32

flutter-managed-configuration

Dart
1
star
33

ionic2-playground

some examples for ionic2
JavaScript
1
star
34

relution-livedata-sample-chat

JavaScript
1
star
35

tmpl

A more specific template engine using stickit and backbone
JavaScript
1
star
36

BlueRange-SDK-iOS

iOS SDK for interaction with Relution SmartBeacons
Objective-C
1
star
37

uikit-sample-portal

Sample portal using the mw-uikit
JavaScript
1
star
38

Catoo

Catoo is a powerful and easy to use catalog framework. Present your products in your branded catalog app on the iPad. Download Catoo, integrate your catalog and publish your app! Premium catalogs, brochures, training materials and manuals can be developed in just a few steps. Optionally thrilling multimedia and shopping features can be added. Developers benefit from a superfast rendering and a compelling usability.
Objective-C
1
star