二維碼掃描

cordova.plugins.barcodeScanner.scan(
		function (result) {
			if(result.cancelled != true) {
				navigator.notification.confirm(
				    result.text,// message
					onConfirm,// callback to invoke with index of button pressed
					    '掃描信息:',// title
					    ['發送','取消']// buttonLabels
					);
				}
				return;
				//alert("We got a barcode\n" +
				//		"Result: " + result.text + "\n" +
				//		"Format: " + result.format + "\n" +
				//		"Cancelled: " + result.cancelled);
			},
		    function (error) {
			    alert("Scanning failed: " + error);
		    }
	   );
相關文章
相關標籤/搜索