バーコードスキャンを行う必要があります。ポータブルクラスライブラリにzxing.net.mobileを追加しました。しかし、私は以下のエラーが表示されますスキャンメソッドを呼び出すとき。PCLでzxing.net.mobileを実装
System.NotSupportedException:代わりにプラットフォーム固有の実装を使用してください。
と私のコードは以下のようになります。
public void Scan()
{
MobileBarcodeScanningOptions options = new MobileBarcodeScanningOptions();
options.DelayBetweenContinuousScans = 2000;
options.AutoRotate = false;
var scanner = new MobileBarcodeScanner();
scanner.ScanContinuously(options, HandleScanResult);
}
private void HandleScanResult(ZXing.Result result)
{
string msg;
if (result != null && !string.IsNullOrEmpty(result.Text)) // Success
{
msg = result.Text;
}
else // Canceled
{
msg = "Scanning Canceled!";
}
}
この問題を解決する方法。助けてください。ありがとう。