Help with app pages! [closed]

-1

I need a help or a direction, I will try to be brief, this is the following I am developing an app for a client, and I need this app in very little time for that reason I decided not to develop by common means, having the speed in mind chose the ionic creator to make the "shell" of the app, and by means of buttons inside that shell I redirect to web pages that are already ready, I used C # to make my "Back end", that is my doubt: I generated an .apk and when I use it on my phone and when I click on one of the buttons it opens a page separately in my browser ie it exits the app and enters the browser, what we wanted was something like what we saw in apps like: Playstation, Young nerd, ign .. an app that takes responsive web links and open them inside the msm app does not enter through the same browser.

What can I do guys ?? I need some help ...

    
asked by anonymous 26.07.2017 / 21:30

1 answer

1

Hello,

Add the line below in your application's OnCreate () method override

webView.setWebViewClient(new MyWebViewClient());

And define this class, still within the OnCreate method

private class MyWebViewClient extends WebViewClient {

    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        view.loadUrl(url);
        return false;
    }
}

In this way, the Android app should respect your WebView and not open other browsers when you try to open a link.

Total credit for Framework System, which was where I found the answer to this problem when I went through it too. link

Att

    
27.07.2017 / 13:29