Ionic framework “如何禁用”;剪贴板“;离子条形码扫描仪中的信息
我已经成功地实现了ngCordova的条形码扫描仪,它工作正常。但是,每次扫描时,都会弹出一条消息,说“已复制到剪贴板”。我想把那条信息处理掉。。。有什么想法吗Ionic framework “如何禁用”;剪贴板“;离子条形码扫描仪中的信息,ionic-framework,clipboard,barcode,ngcordova,Ionic Framework,Clipboard,Barcode,Ngcordova,我已经成功地实现了ngCordova的条形码扫描仪,它工作正常。但是,每次扫描时,都会弹出一条消息,说“已复制到剪贴板”。我想把那条信息处理掉。。。有什么想法吗 谢谢 解决方案设置为参数resultDisplayDuration:0 例: )) 虽然这个代码片段可以解决这个问题,但它确实有助于提高文章的质量。请记住,您将在将来回答读者的问题,这些人可能不知道您的代码建议的原因。 cordova.plugins.barcodeScanner.scan( function (result) {
谢谢 解决方案设置为参数resultDisplayDuration:0 例:
)) 虽然这个代码片段可以解决这个问题,但它确实有助于提高文章的质量。请记住,您将在将来回答读者的问题,这些人可能不知道您的代码建议的原因。
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);
},
{
preferFrontCamera : true, // iOS and Android
showFlipCameraButton : true, // iOS and Android
showTorchButton : true, // iOS and Android
torchOn: true, // Android, launch with the torch switched on (if available)
prompt : "Place a barcode inside the scan area", // Android
resultDisplayDuration: 0, // Android, display scanned text for X ms. 0 suppresses it entirely, default 1500
formats : "QR_CODE,PDF_417", // default: all but PDF_417 and RSS_EXPANDED
orientation : "landscape", // Android only (portrait|landscape), default unset so it rotates with the device
disableAnimations : true, // iOS
disableSuccessBeep: false // iOS
}