我想组装一个移动友好的数据采集应用,这个应用程序将在数据中心使用,这意味着这个应用程序还需要(在客户端)携带(在客户端)一个mongodb集合的ASCI\字符代码,以便在返回联机后与传入的条形码相匹配,这个应用程序应该将所有获取的数据与其后端mongodb同步。
基于这些要求,我认为流星是一个很好的选择。
我的问题是:是否有流星包,可以扫描图像,然后将该图像转换为ASCII字符代码?
发布于 2015-06-14 03:22:15
要获得条形码扫描功能,请使用BarcodeScanner cordova插件:
meteor add cordova:com.phonegap.plugins.barcodescanner@2.0.1模板
<head>
<title>Barcode Scanner</title>
</head>
<body
{{> barcode_scanner}}
</body>
<template name="barcode_scanner">
<button>Scan</button>
</template>JS
if (Meteor.isCordova) {
Template.barcode_scanner.events({
'click button': function () {
cordova.plugins.barcodeScanner.scan(
function (result) {
alert("We got a barcode\n" +
"Result: " + result.text + "\n" +
"Format: " + result.format + "\n" +
"Cancelled: " + result.cancelled);
},
function (error) {
alert("Scanning failed: " + error);
}
);
}
});
}要获得脱机数据功能,请查看GroundDB
https://stackoverflow.com/questions/30824515
复制相似问题