Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/myflashlab/barcode-ANE

Scan almost any barcode type with this super fast barcode scanner air native extension
https://github.com/myflashlab/barcode-ANE

Last synced: 3 months ago
JSON representation

Scan almost any barcode type with this super fast barcode scanner air native extension

Awesome Lists containing this project

README

        

# Barcode ANE (Android+iOS)
This ANE enables AS3 AIR developers, to easily use the native camera on device and scan for almost all different barcodes and get the result to their AIR project.

## Supported barcodes:
* UPCE
* CODE39
* EAN13
* EAN8
* CODE128
* PDF417
* QR
* AZTEC
* ITF14
* DATAMATRIX

[find the latest **asdoc** for this ANE here.](http://myflashlab.github.io/asdoc/com/myflashlab/air/extensions/barcode/package-detail.html)

# AIR Usage
For the complete AS3 code usage, see the [demo project here](https://github.com/myflashlab/barcode-ANE/blob/master/AIR/src/MainFinal.as).

```actionscript
import com.myflashlab.air.extensions.barcode.*;

var _ex:Barcode = new Barcode();
_ex.addEventListener(BarcodeEvent.RESULT, onResult);
_ex.addEventListener(BarcodeEvent.CANCEL, onCancel);

if(OverrideAir.os == OverrideAir.ANDROID)
{
// to speed up the launch time on Android, you may call the warmup method when
// it is appropriate in your application. This may be needed if you are using the
// full version of AndroidSupport dependency.
// the first time you call the warmup method, your app will freeze for a few seconds...
_ex.warmup();
}

if (_ex.isSupported())
{
trace("Please wait...");

// to read only the selected barcode types. use an array to read one or more barcodes
//_ex.open([Barcode.QR], File.applicationDirectory.resolvePath("com_doitflash_barcode_beep.mp3"), true, "Cancel");

// to read all barcodes supported by the extension. read documentations to know which barcodes are supported.
_ex.open(null, File.applicationDirectory.resolvePath("com_doitflash_barcode_beep.mp3"), true, "Cancel");
}
else
{
trace("isSupported: ", _ex.isSupported());
}

function onCancel(e:BarcodeEvent):void
{
trace("scan canceled")
}

function onResult(e:BarcodeEvent):void
{
trace("type is: ", e.param.type)
trace("data is: ", e.param.data);
}
```

# AIR .xml manifest
```xml




































MinimumOSVersion
10.0


NSCameraUsageDescription
My description about why I need this feature in my app

com.myflashlab.air.extensions.barcode


com.myflashlab.air.extensions.permissionCheck


com.myflashlab.air.extensions.dependency.overrideAir
com.myflashlab.air.extensions.dependency.androidx.core

```

# Requirements
* This ANE is dependent on **permissionCheck**. Download it from [here](http://www.myflashlabs.com/product/native-access-permission-check-settings-menu-air-native-extension/).
* AIR SDK 30+
* Android 19+
* iOS 10.0+

# Permissions
Below are the list of Permissions this ANE might require. Check out the demo project available at this repository to see how we have used the [PermissionCheck ANE](http://www.myflashlabs.com/product/native-access-permission-check-settings-menu-air-native-extension/) to ask for the permissions.

Necessary | Optional
--------------------------- | ---------------------------
[SOURCE_CAMERA](https://myflashlab.github.io/asdoc/com/myflashlab/air/extensions/nativePermissions/PermissionCheck.html#SOURCE_CAMERA) | NONE

# Commercial Version
https://www.myflashlabs.com/product/qr-code-ane-adobe-air-native-extension/

[![Barcode code scanner ANE](https://www.myflashlabs.com/wp-content/uploads/2015/11/product_adobe-air-ane-extension-qr-code-2018-595x738.jpg)](https://www.myflashlabs.com/product/qr-code-ane-adobe-air-native-extension/)

# Tutorials
[How to embed ANEs into **FlashBuilder**, **FlashCC** and **FlashDevelop**](https://www.youtube.com/watch?v=Oubsb_3F3ec&list=PL_mmSjScdnxnSDTMYb1iDX4LemhIJrt1O)

# Premium Support #
[![Premium Support package](https://www.myflashlabs.com/wp-content/uploads/2016/06/professional-support.jpg)](https://www.myflashlabs.com/product/myflashlabs-support/)
If you are an [active MyFlashLabs club member](https://www.myflashlabs.com/product/myflashlabs-club-membership/), you will have access to our private and secure support ticket system for all our ANEs. Even if you are not a member, you can still receive premium help if you purchase the [premium support package](https://www.myflashlabs.com/product/myflashlabs-support/).