Help with app pages!

Asked

Viewed 56 times

-1

need a help or direction, I will try to be brief, is the following I am developing an app for a customer, and I need this app in a very short time so I decided not to develop by common means, having the speed in mind have chosen 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 one . 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 leaves the app and enters the Browser, what we wanted was something similar to what we saw in apps like: Playstation, Young nerd, ign.. an app that takes responsive web links and opens them within the msm app not to enter by the same browser.

What can I do personal?? I need a help...

  • 1

    Friend, you could be simpler and of course... But come on! If you are using Ionic, you can call Cordova’s webview! $Scope.openCordovaWebView = Function() { window.open('http://google.com','_self'); };

  • 1

    estou desenvolvendo um app para um cliente, e preciso desse app em pouquíssimo tempo Learn not to try to take steps bigger than your legs.

1 answer

1


Hello,

Add the line below in your application’s Oncreate() superscript method

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 trying to open a link.

Total credit for Framework System, which is where I found the answer to this problem when I went through it too. http://www.frameworksystem.com/mobile-webview-abrindo-em-um-browser/

Att

Browser other questions tagged

You are not signed in. Login or sign up in order to post.