守望者--AIR技术交流
标题: 读取条形码,二维码ANE(Android or iOS) [打印本页]
作者: 破晓 时间: 2015-1-23 16:17
标题: 读取条形码,二维码ANE(Android or iOS)
本帖最后由 破晓 于 2015-2-20 17:25 编辑
Barcode Scanning for AIR Mobile AppsA Native Extension thats Fast and Smooth!This library uses the ZBar Reader under the hood to provide barcode scanning for actionscript applications running on AIR Android or iOS.This supports QR Codes, EAN13, EAN8 and Many More!!How To Use:This library exposes APIs that will allow application developer to Scan the Barcodes in following two ways.
- From Live Camera Feed: You can place a camera feed (Rear or Front) using library APIs and just attach scanner to the feed to get DATA events whenever your Camera "sees" a Barcode.
- From Bitmap/Image: Developer can provide an arbitary Image to Scan for a Barcode. (Work In Progress)
Get Started:
Step 1: Link The ANE : Get the Latest ANE File from the root of the repository. Add it as a dependency in your favourite IDE.
Note: Newer IDEs know what ANE means and you can link ANE files transperently. If you are using an older IDE, you may need to
google a bit on how to link ANEs to your project.
Step 2: See the Samples: Have a look at some of the manual tests I have written which can explain different uses of the APIs.
Step 3: See the Documentation : I have tried my best to document the available APIs in the code.Read It!.
Need Help?
I can exchange my time for money, if you need:
- Private Support : Do you have some requirement which can not be accomplished by the planned features of this project? I can work with you to provide a private clone which has feature additions/modifications to suit your use-case.
Refer to my email at the bottom of the page.
Can you Help?
I've been giving my weekends to keep this project alive. If any part of this project has helped you in
- Delivering your app
- Creating your own native extension
- Helped you understand things better
- saved your time
I welcome support in any of the following form:
- Contribute : I will really appreciate getting code contributions from the talent all around the world. If you think you can help, please contact me, and I can get your workspace ready for developement.If not you can always help by
- Writing tutorials, wiki pages, reference documentation.
- Improving the build system, help setup automated builds.
- Report issues, feature request to make this library a better candidate for general use-cases.
- Say Thanks : If you have used this library in any public project, you can mention this project in credits and /or send me a thanks mail with your app link which I can add on my released apps page(Yet To Come).
- Donate : Cheer Me up with a beer (Pint,Glass,Pitcher,Tower
) and get a name in the list of donors. My Email is also a paypal account which you can use for donating.
Contact Me:
- Email: saumitra.(Last 5 characters of my github username)@gmail.com (Paypal Account)
- Facebook: https://www.facebook.com/saumitrabhave
- LinkedIn: in.linkedin.com/pub/saumitra-bhave/17/a65/65/
- Twitter: @saumitrabhave
Donors:No one yet, Be the first one.
[attach]595[/attach]
相关链接:
https://github.com/saumitrabhave/qr-zbar-ane
作者: 破晓 时间: 2015-1-24 12:01
其他资源:
[attach]618[/attach]
作者: 破晓 时间: 2015-1-26 17:54
Barcode/QR code reader AIR native extension for iOS+Android, that uses the ZBar library.
Barcode/QR code reader AIR native extension, that uses the ZBar library. It uses Zbar 0.2 for Android and Zbar from http://code.google.com/p/qr-zbar-ane/ for iOS.
For details and installation instructions see the wiki page. The actual .ane file is at zbar-ane /builddir/zbar.ane , you need this if you just want the project and dont want to mess with the source.
[attach]692[/attach]
相关链接:
https://github.com/matyasf/zbar-ane
作者: 破晓 时间: 2015-1-29 16:49
ZXing-ANE
a QR Code, bar code, image recognizer ANE for iOS & Android using ZXing library
ZXing-ANEA QR Code, bar code, image recognizer ANE for iOS & Android using ZXing lib even on iOS. There is a default implementation for Web & Desktop player using pure AS3.
Be careful, this ANE doesn't only check for QRCode but for all formats supported by the ZXing library. A future version optimized should add argument for the format requested.
Note: This ANE doesn't manage camera stuff, it takes a bitmap data as an argumentdecodeFromBitmapData and return a ZXingEvent.SUCCESS with the URL found or a ZXingEvent.FAIL.
- var zxing:ZXing = new ZXing();
- zxing.addEventListener(ZXingEvent.FAIL, _zxingEvt);
- zxing.addEventListener(ZXingEvent.SUCCESS, _zxingEvt);
- zxing.decodeFromBitmapData(new qrCodeBitmap().bitmapData);
- private function _zxingEvt(zxEvt:ZXingEvent):void {
- if (zxEvt.type == ZXingEvent.SUCCESS)
- trace(zxEvt.url);
- else
- trace("fail");
- }
复制代码If you get this Error: The extension com.davikingcode.nativeExtensions.ZXing has either a namespace version or library.swf with a version that is incompatible with the applications namespace or root SWF. it means that you must compile your SWF with an upper swf version than your default. For example add -swf-version=25 to your command line.If you get Error while loading initial content it means that you need to change your -swf-version too!
[attach]723[/attach]
相关链接:
https://github.com/DaVikingCode/ZXing-ANE
作者: 破晓 时间: 2015-2-20 17:25
相关下载:
支持64位
https://github.com/DaVikingCode/ZBar-ANE
作者: 破晓 时间: 2015-3-31 09:45
QRZBar
QR scanner ane extension for Adobe Flash iOS
QRZBarQR scanner ane extension for Adobe Flash iOS
This QR Scanner uses ZBar iPhone library. It has a flash wrapper so you can connect to the Native Code via Actionscript so flash developers don't have to go into Objective C and still get the benefits of the native performance.
qr-zbar-ane : http://code.google.com/p/qr-zbar-ane/
[attach]997[/attach]
相关链接:
https://github.com/sewonist/QRZBar
作者: 破晓 时间: 2015-3-31 14:16
本帖最后由 破晓 于 2015-4-8 15:36 编辑
相关下载:
QR scanner ane extension for Adobe Flash iOS
https://github.com/sewonist/QRZBar
AIR Native Extension for the ZBar QR Code Reader Library
https://github.com/katopz/qr-zbar-ane
作者: 刀客 时间: 2015-6-28 09:47
好 好 好
作者: zhaofu 时间: 2015-7-23 16:42
谢谢分享
作者: 破晓 时间: 2016-1-25 18:57
Air for Android 条形码识别
下面介绍一个针对Android的条形码识别ANE,该ANE是使用 zxing开源算法实现的,ANE中包括以下功能:1、打开摄像头
2、自动对焦
3、识别条形码/二维码
该ANE的下载地址:http://www.littlesix.com.cn/air/android/barcodereader.zip
原文链接:http://bbs.9ria.com/thread-106240-1-1.html
下面重点说以下使用该ANE的配置方法,因为需要使用到硬件设备摄像头,所以配置会有点麻烦,而且很容易出错(PS:只要xml配置出错,那么该ANE会完全失效)
配置步骤:
1、应用程序描述
<application>
<activity android:name="com.sixuu.BarCodeReader.CaptureActivity"
android:screenOrientation="landscape"
android:configChanges="orientation|keyboardHidden"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:windowSoftInputMode="stateAlwaysHidden" >
</activity>
</application>
2、在XML中写入所有需要用到的权限,其中包括:
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
以上4个均为ANE中需要使用到的权限。
3、在XML中写入需要用到的硬件feature
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
| 欢迎光临 守望者--AIR技术交流 (http://www.airmyth.com/) |
|