Thanks to visit codestin.com
Credit goes to github.com

Skip to content

lleqsnoom/barcode

 
 

Repository files navigation

Barcode

Real-time barcode scanning for iOS + Android

This extension provides real-time barcode scanning functionality for iOS and Android, directly from the device's camera.

In iOS, it uses the ZBarSDK and the scanner is integrated as a view inside the app.

In Android, it uses the Google/ZXing Barcode Scanner app as a service. This app must be installed separately for barcode scanning to work. The extension provides an indication if it's not installed when attempting to scan.

Dependencies

  • This extension requires inclusion of extensionkit which must be available in a folder beside this one.

  • On iOS, this extension requires extra resources to be added to the app. Manually add the imagery from barcode/project/iphone/ZBarSDK/Resources into the top-level Resources group in XCode.

Installation

git clone https://github.com/bazzisoft-openfl-extensions/extensionkit
git clone https://github.com/bazzisoft-openfl-extensions/barcode
lime rebuild extensionkit [linux|windows|mac|android|ios]
lime rebuild barcode [linux|windows|mac|android|ios]

Usage

project.xml

<include path="/path/to/extensionkit" />
<include path="/path/to/barcode" />

Haxe

class Main extends Sprite
{
	public function new()
    {
		super();

        Barcode.Initialize();

        stage.addEventListener(BarcodeScannedEvent.BARCODE_SCANNED, function(e) { trace(e); } );
        stage.addEventListener(BarcodeScannedEvent.BARCODE_SCAN_CANCELLED, function(e) { trace(e); });

        #if !mobile
        // When testing on flash/desktop, ScanBarcode() should return this barcode...
        Barcode.SetFakeScanBarcodeResult("1234-ABCD", "CODE-128");
        #end

        Barcode.ScanBarcode();

        ...
    }
}

XCode Project

Manually add the imagery from barcode/project/iphone/ZBarSDK/Resources into the top-level Resources group in XCode.

About

Real-time barcode scanning for iOS + Android

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 70.2%
  • Objective-C 19.6%
  • HTML 4.4%
  • Haxe 2.9%
  • Objective-C++ 2.7%
  • Batchfile 0.1%
  • Shell 0.1%