Ti.Barcode Module

Description

Lets you process 1D/2D barcodes.

System Requirements

Barcode module has support for iOS 4 and later. The module does not support iOS versions prior to iOS 4.

Accessing the Ti.Barcode Module

To access this module from JavaScript, you would do the following:

Titanium.Barcode = Ti.Barcode = require("ti.barcode");

Functions

Ti.Barcode.capture({...})

Brings up the camera and begins the capture sequence for processing a barcode. Takes one argument, a dictionary containing the keys:

Each callback receives an event with the following properties, if available:

Properties

Ti.Barcode.allowRotation[boolean]

Value that indicates if the barcode capture should analyze captured images in either portrait or landscape device orientation. (Warning: Analyzing both the captured image and the rotated version(s) of the image will increase the processing time of the capture.)

Ti.Barcode.displayedMessage[string]

Controls the message that is displayed to the end user when they are capturing a barcode.

URL[int] (read-only)

Value representing URL content

SMS[int] (read-only)

Value representing SMS content

TELEPHONE[int] (read-only)

Value representing telephone number content

TEXT[int] (read-only)

Value representing text content

CALENDAR[int] (read-only)

Value representing date content

GEOLOCATION[int] (read-only)

Value representing geolocation content

EMAIL[int] (read-only)

Value representing an email address

CONTACT[int] (read-only)

Value representing contact information (vcard or mecard)

BOOKMARK[int] (read-only)

Value representing bookmark content

Usage

See example.

Author

Jeff Haynie jhaynie@appcelerator.com, Appcelerator Inc.
Jeff English jenglish@appcelerator.com, Appcelerator Inc.

License

Copyright(c) 2010-2011 by Appcelerator, Inc. All Rights Reserved. Please see the LICENSE file included in the distribution for further details.