| Package | com.myflashlab.air.extensions.barcode |
| Class | public class Barcode |
| Inheritance | Barcode flash.events.EventDispatcher |
Make sure to take care of the permissions first: https://github.com/myflashlab/barcode-ANE/#permissions
| Property | Defined By | ||
|---|---|---|---|
| context : ExtensionContext [read-only] | Barcode | ||
| Method | Defined By | ||
|---|---|---|---|
Barcode()
Initialize the barcode scanner extension
| Barcode | ||
dispose():void
when you're done with this extension, call this method to free up the memory. | Barcode | ||
isSupported():Boolean
This extension is supported on Android SDK 15 or higher and iOS 8.0 or higher. | Barcode | ||
open($scanTypes:Array = null, $beepSound:File = null, $toVibrate:Boolean = false, $cancelBtnLabel:String = Cancel):Boolean
Use this method to run the camera and start detecting barcodes. | Barcode | ||
warmup():void | Barcode | ||
| Constant | Defined By | ||
|---|---|---|---|
| ALL : Array [static] | Barcode | ||
| AZTEC : String = org.iso.Aztec [static] | Barcode | ||
| CODE128 : String = org.iso.Code128 [static] | Barcode | ||
| CODE39 : String = org.iso.Code39 [static] | Barcode | ||
| DATAMATRIX : String = org.iso.DataMatrix [static] | Barcode | ||
| EAN13 : String = org.gs1.EAN-13 [static] | Barcode | ||
| EAN8 : String = org.gs1.EAN-8 [static] | Barcode | ||
| EXTENSION_ID : String = com.myflashlab.air.extensions.barcode [static] | Barcode | ||
| ITF14 : String = org.gs1.ITF14 [static] | Barcode | ||
| PDF417 : String = org.iso.PDF417 [static] | Barcode | ||
| QR : String = org.iso.QRCode [static] | Barcode | ||
| UPCE : String = org.gs1.UPC-E [static] | Barcode | ||
| VERSION : String = 4.0.3 [static] | Barcode | ||
| context | property |
context:ExtensionContext [read-only] public function get context():ExtensionContext| Barcode | () | Constructor |
public function Barcode()Initialize the barcode scanner extension
| dispose | () | method |
public function dispose():voidwhen you're done with this extension, call this method to free up the memory. If you call this method, you will have to reinitialize the extension to be able to work with it.
| isSupported | () | method |
public function isSupported():BooleanThis extension is supported on Android SDK 15 or higher and iOS 8.0 or higher.
ReturnsBoolean — Boolean
|
| open | () | method |
public function open($scanTypes:Array = null, $beepSound:File = null, $toVibrate:Boolean = false, $cancelBtnLabel:String = Cancel):BooleanUse this method to run the camera and start detecting barcodes.
Parameters
$scanTypes:Array (default = null) — set to null to read all barcodes supported with this ANE. but it will improve performance if you set only those which you require in your app only.
| |
$beepSound:File (default = null) — set to null if you don't want any beep sound to be played when the barcode is read.
| |
$toVibrate:Boolean (default = false) — set to true if you wish the device to vibrate a little when a barcode is detected.
| |
$cancelBtnLabel:String (default = Cancel) — There's no back button on iOS, so you can set the label of the cancel button on iOS side with this parameter. this button won't be shown on Android at all.
|
Boolean — returns true if the operation is succefull.
|
| warmup | () | method |
public function warmup():void| ALL | Constant |
public static const ALL:Array| AZTEC | Constant |
public static const AZTEC:String = org.iso.Aztec| CODE128 | Constant |
public static const CODE128:String = org.iso.Code128| CODE39 | Constant |
public static const CODE39:String = org.iso.Code39| DATAMATRIX | Constant |
public static const DATAMATRIX:String = org.iso.DataMatrix| EAN13 | Constant |
public static const EAN13:String = org.gs1.EAN-13| EAN8 | Constant |
public static const EAN8:String = org.gs1.EAN-8| EXTENSION_ID | Constant |
public static const EXTENSION_ID:String = com.myflashlab.air.extensions.barcode| ITF14 | Constant |
public static const ITF14:String = org.gs1.ITF14| PDF417 | Constant |
public static const PDF417:String = org.iso.PDF417| QR | Constant |
public static const QR:String = org.iso.QRCode| UPCE | Constant |
public static const UPCE:String = org.gs1.UPC-E| VERSION | Constant |
public static const VERSION:String = 4.0.3