Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Xamarin Navigation Problem

$
0
0

Hello everyone, so I got a problem when I want to push a ZXingScannerPage for scan a QRCode. This is my code :

        MainPage = new NavigationPage(new MainPage());

        var scanPage = new ZXingScannerPage();
        await MainPage.Navigation.PushAsync(scanPage, true);
        scanPage.OnScanResult += (result) =>
        {
            scanPage.IsScanning = false;
            Device.BeginInvokeOnMainThread(() =>
            {
                QrCodeScanned = JsonConvert.DeserializeObject<QRCode>(result.Text);
            });
        };

So basically this code work on Android, but not on iOS. And when i switch the PushAsync method to the PushModalAsync method it's work on iOS but no more on Android.

Someone have a idea to correct this error pls?
Thank for your time and answers.


Viewing all articles
Browse latest Browse all 77050

Trending Articles