Forum Xamarin.iOS

When Cancel button in "MobileBarCodeScanner()" clicked, Application Exsits and Crashes!(Xamarin.iOS)

AssegdAssegd Member ✭✭✭
edited July 2019 in Xamarin.iOS

I am looking for a solution, when the cancel button in the "MobileBarcodeScanner" page is clicked, the app exists and crashes. I want to handle this issue, just to go back to the other view controllers when "cancel" button is clicked

private async void CustomizedQrCodeScanner()
var scanner = MobileBarcodeScanner();
var result = await scanner.Scan();
if (result.Text != null)
qrcodeFromLiveCamera = result.Text;
Console.WriteLine("Scanned Barcode: " + result.Text);
ShowMessage("QrCode Detected: ", result.Text);



Sign In or Register to comment.