Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OnNavigationStarted is not working on Android #138

Open
mohammedmsadiq opened this issue Sep 1, 2020 · 0 comments
Open

OnNavigationStarted is not working on Android #138

mohammedmsadiq opened this issue Sep 1, 2020 · 0 comments

Comments

@mohammedmsadiq
Copy link

the OnNavigationStarted event is not firing on android but it works on iOS fine see code below;

WebView1.OnNavigationStarted += WebView1_OnNavigationStarted;

private void WebView1_OnNavigationStarted(object sender, Xam.Plugin.WebView.Abstractions.Delegates.DecisionHandlerDelegate e)
        {
            var localUrl = e.Uri;
            var pdfExtension = ".pdf";

            if (localUrl.EndsWith(pdfExtension))
            {
                PdfLoadingControl.IsRunning = true;
                e.Cancel = true;
                assetWebViewPageViewModel.loadPDf(localUrl);
                PdfViwer.IsVisible = true;
            }
        }

Any suggestions...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant