New*_*bee 73 iphone android barcode-scanner cordova
我需要在Android和iPhone中使用phonegap扫描条形码.有没有办法做到这一点?
Rob*_*abs 47
Kris Erickson是正确的,Zxing&Phonegap项目已经为您解决了繁重的工作.(我目前的SO声誉不允许我评论,但我会.)
我刚刚制作了一个Phonegap/Android应用程序,使用这里的插件扫描QR条码.按照说明操作,您应该会成功.这个插件可能是自Kris的回答以来编写的.
Javascript很简单,直接来自https://github.com/phonegap/phonegap-plugins/
var scanBarcode = function() {
window.plugins.barcodeScanner.scan( BarcodeScanner.Type.QR_CODE,function(result) {
alert("We got a barcode: " + result);
}, function(error) {
alert("Scanning failed: " + error);
}, {yesString: "Install"}
);
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
54616 次 |
最近记录: |