Why is xamarin android is loading external apps like chrome, firefox... choose @webview.LoadUrl?

Horus_SiriusHorus_Sirius DEMember ✭✭

i want to load a webpage that is on a internet server and allow the user to surf through all link in my app.

Why is xamarin android is loading external apps like chrome, firefox... choose @webview.LoadUrl?

        webview = FindViewById <WebView>(Resource.Id.webView1);
        webview.LoadUrl("my-https-url");

if i click on a link in the JTLAppConnector Website i'll be asked to open with external App like firefox, chrome...

how to surf through the webpage in the webview?

Best Answer

  • Horus_SiriusHorus_Sirius DEMember ✭✭
    Accepted Answer

    the solution is this:

    webview.SetWebViewClient(new WebViewClient());
    webview.LoadUrl("my-https-url");

    put SetWebViewClient before LoadUrl()

Answers

  • Horus_SiriusHorus_Sirius DEMember ✭✭
    Accepted Answer

    the solution is this:

    webview.SetWebViewClient(new WebViewClient());
    webview.LoadUrl("my-https-url");

    put SetWebViewClient before LoadUrl()

  • batmacibatmaci DEMember ✭✭✭✭

    you must use Source element of the WebView
    sample usage in xaml

    <WebView Source="{Binding urlRedirect}" />

  • Horus_SiriusHorus_Sirius DEMember ✭✭

    Howto Use in Sourcecode?

  • batmacibatmaci DEMember ✭✭✭✭

    I am not sure but probably webview.source="url"; simply. see the xamarin documentation

  • Horus_SiriusHorus_Sirius DEMember ✭✭

    @batmaci said:
    I am not sure but probably webview.source="url"; simply. see the xamarin documentation

    there is no webview.source in my Case.

Sign In or Register to comment.