以前まで使用出来ていたCordovaプラグインのbarcodeScannerが、iOSのみ機能しなくなってしまいました。
ドキュメント通りに組み込んでも、スキャン画面に移行するものの、バーコードの値が読み込めません。
また、iOS環境下だと、スキャン画面のキャンセルボタンを押すとアプリが落ちます・・・
(アンドロイドは機能します。)
何か仕様が変わったのでしょうか?
使用方法ご存知の方おられましたら、ご教示いただければ幸いです。
<html> <head> <title>Barcode Scanner DEMO</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, user-scalable=no"> <script src="components/loader.js"></script> <link rel="stylesheet" href="components/loader.css"> <script type="text/javascript"> function scanBarcode() { window.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); } ); } </script> </head> <body> <hr> BarcodeReader DEMO <hr><br> <input type="button" onClick ="scanBarcode()" value ="Scan" /> </body> </html>
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。