我在Phonegap中使用Scandit Barcode扫描仪。我正在创建一个iOS应用
我已成功将扫描仪应用到我的应用程序中,一切正常,直到我扫描了一个二维码,它振动但它没有显示我扫描的二维码的页面,它只是返回我的应用程序。
(我按照教程:http://www.inno-swiss.com/post/view/24448/)
我可以知道如何解决这个问题吗?这是我的html中的扫描程序脚本。
<script type="text/javascript">
function onBodyLoad()
{
document.addEventListener("deviceready", onDeviceReady, false);
}
function success(concatResult) {
resultArray = concatResult.split("|");
alert("Scanned " + resultArray[0] + " code: " + resultArray[1]);
}
function failure(error) {
alert("Failed: " + error);
}
function scan() {
// See ScanditSDK.h for more available options.
cordova.exec(success, failure, "ScanditSDK", "scan",
["kI0HjHANEeOZZ+IFvIjVQ1D5+g0sVUMkiAEQdYKlCMI",
{"beep": true,
"1DScanning" : true,
"2DScanning" : true,
"qr" : true,
"scanningHotspot" : "0.5/0.5",
"vibrate" : true,
"textForInitialScanScreenState" :
"Align code with box",
"textForBarcodePresenceDetected" :
"Align code and hold still",
"textForBarcodeDecodingInProgress" : "Decoding",
"searchBarActionButtonCaption" : "Go",
"searchBarCancelButtonCaption" : "Cancel",
"searchBarPlaceholderText" :
"Scan barcode or enter it here",
"toolBarButtonCaption" : "Cancel",
"minSearchBarBarcodeLength" : 8,
"maxSearchBarBarcodeLength" : 15}]);
}
app.initialize();
</script>