How To Get Web Page To Open Inside App

This is a discussion on How To Get Web Page To Open Inside App within the Beginning Developers forums, part of the Android Development category; I found an app's source code and the first page when you open the app, it opens the page from gooogle chrome or any other ...

Results 1 to 1 of 1

Thread: How To Get Web Page To Open Inside App

  1. #1
    Android Lurker StonebridgeGR's Avatar
    Join Date
    Feb 2019
    Posts
    1

    How To Get Web Page To Open Inside App

    I found an app's source code and the first page when you open the app, it opens the page from gooogle chrome or any other browser but I want when someone open the app to open specific page, it should open in the app not external . I think this below I should change somehow

    private class MyWebviewClient extends WebViewClient {
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
    if (Uri.parse(url).getHost().equals) {
    //open url contents in webview
    return false;
    } else {
    //here open external links in external browser or app
    Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
    startActivity(intent);
    return true;
    }
    Last edited by cali; 02-10-2019 at 09:21 PM. Reason: Removed Embedded Links

  2. Android.net is the premier Android Forum. Registered users do not see these ads. .

Remove Ads

http://www.scramblerducati.org/

Sponsored Links

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Similar Threads

  1. Box with Checkmark Inside to Right of Battery Meter on Top
    By Jdegroot01 in forum Motorola Photon Tech Support
    Replies: 7
    Last Post: 08-03-2012, 09:17 AM
  2. RMA Nexus One Inside Canada
    By bourne in forum Nexus One
    Replies: 19
    Last Post: 05-16-2011, 10:36 PM
  3. Replies: 6
    Last Post: 04-01-2011, 08:51 AM
  4. Another N1 with Tmo radio inside
    By Vontekka in forum Off-Topic Forum
    Replies: 3
    Last Post: 07-07-2010, 09:53 AM
Android Forum