How can I make internal links load within webview?How do I generate random integers within a specific range in Java?How can I create an executable JAR with dependencies using Maven?How can I convert a stack trace to a string?Why is the Android emulator so slow? How can we speed up the Android emulator?How do I make links in a TextView clickable?How to get Webview iframe link to launch the browser?Android - webview - shouldOverrideUrlLoading not called - when user clicks links inside iframeError message -> shouldOverrideUrlLoading Webview AndroidShow PDF file in AppIs default behavior of Android's WebView changed to open internally all links?

Does the "6 seconds per round" rule apply to speaking/roleplaying during combat situations?

Remove sudoers using script

Why don't B747s start takeoffs with full throttle?

Strange symbol for two functions

What is this solid state starting relay component?

What can plausibly explain many of my very long and low-tech bridges?

How can you travel on a trans-Siberian train when it is fully booked?

Where does this pattern of naming products come from?

Building a road to escape Earth's gravity by making a pyramid on Antartica

What happens when the attacking player dies to damage triggers after killing the blocking creatures in the first combat step of double strike?

Random Portfolios vs Efficient Frontier

Payment instructions from HomeAway look fishy to me

Do any instruments not produce overtones?

Should an arbiter claim draw at a K+R vs K+R endgame?

What risks are there when you clear your cookies instead of logging off?

PL/SQL function to receive a number and return its binary format

My coworkers think I had a long honeymoon. Actually I was diagnosed with cancer. How do I talk about it?

How is it possible that Gollum speaks Westron?

Do the English have an ancient (obsolete) verb for the action of the book opening?

Question about JavaScript Math.random() and basic logic

Translating 'Liber'

What's the right way to purge recursively with apt?

What does the "c." listed under weapon length mean?

2.8 is missing the Carve option in the Boolean Modifier



How can I make internal links load within webview?


How do I generate random integers within a specific range in Java?How can I create an executable JAR with dependencies using Maven?How can I convert a stack trace to a string?Why is the Android emulator so slow? How can we speed up the Android emulator?How do I make links in a TextView clickable?How to get Webview iframe link to launch the browser?Android - webview - shouldOverrideUrlLoading not called - when user clicks links inside iframeError message -> shouldOverrideUrlLoading Webview AndroidShow PDF file in AppIs default behavior of Android's WebView changed to open internally all links?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















I am having issues with trying to get internal links to open within my webview-based android client that I am doing for a small business. What do I need to do so that the application can only open links with "https://forums.mywebsite.com" and "https://mywebsite.com"?



I already have the procedure I need to open external links using the action view, but this only links away from the first page that is stated in the loadurl(), and does not link them within the client, and treats them as external links.



aWebView.setWebViewClient(new WebViewClient() 
@Override
@TargetApi(21)
public boolean shouldOverrideUrlLoading(WebView aWebView, WebResourceRequest request)
Intent intent = new Intent(Intent.ACTION_VIEW, request.getUrl());

superWebView.getContext().startActivity(intent);

return true;

);


TL;DR: link expectations are not working, and any help would be appreciated.










share|improve this question






























    1















    I am having issues with trying to get internal links to open within my webview-based android client that I am doing for a small business. What do I need to do so that the application can only open links with "https://forums.mywebsite.com" and "https://mywebsite.com"?



    I already have the procedure I need to open external links using the action view, but this only links away from the first page that is stated in the loadurl(), and does not link them within the client, and treats them as external links.



    aWebView.setWebViewClient(new WebViewClient() 
    @Override
    @TargetApi(21)
    public boolean shouldOverrideUrlLoading(WebView aWebView, WebResourceRequest request)
    Intent intent = new Intent(Intent.ACTION_VIEW, request.getUrl());

    superWebView.getContext().startActivity(intent);

    return true;

    );


    TL;DR: link expectations are not working, and any help would be appreciated.










    share|improve this question


























      1












      1








      1








      I am having issues with trying to get internal links to open within my webview-based android client that I am doing for a small business. What do I need to do so that the application can only open links with "https://forums.mywebsite.com" and "https://mywebsite.com"?



      I already have the procedure I need to open external links using the action view, but this only links away from the first page that is stated in the loadurl(), and does not link them within the client, and treats them as external links.



      aWebView.setWebViewClient(new WebViewClient() 
      @Override
      @TargetApi(21)
      public boolean shouldOverrideUrlLoading(WebView aWebView, WebResourceRequest request)
      Intent intent = new Intent(Intent.ACTION_VIEW, request.getUrl());

      superWebView.getContext().startActivity(intent);

      return true;

      );


      TL;DR: link expectations are not working, and any help would be appreciated.










      share|improve this question
















      I am having issues with trying to get internal links to open within my webview-based android client that I am doing for a small business. What do I need to do so that the application can only open links with "https://forums.mywebsite.com" and "https://mywebsite.com"?



      I already have the procedure I need to open external links using the action view, but this only links away from the first page that is stated in the loadurl(), and does not link them within the client, and treats them as external links.



      aWebView.setWebViewClient(new WebViewClient() 
      @Override
      @TargetApi(21)
      public boolean shouldOverrideUrlLoading(WebView aWebView, WebResourceRequest request)
      Intent intent = new Intent(Intent.ACTION_VIEW, request.getUrl());

      superWebView.getContext().startActivity(intent);

      return true;

      );


      TL;DR: link expectations are not working, and any help would be appreciated.







      java android






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 24 at 15:34









      Zoe

      15.1k85789




      15.1k85789










      asked Mar 24 at 15:34









      Androidguy1Androidguy1

      61




      61






















          1 Answer
          1






          active

          oldest

          votes


















          1














          As the docs explains:




          returning true causes the current WebView to abort loading the URL, while returning false causes the WebView to continue loading the URL as usual.




          You should have logic in the method that checks the URL and returns false only if the url matches your expected URLs and starts the activity and return true otherwise.



          Something along those lines:



           WebView.setWebViewClient(new WebViewClient() 
          @Override
          @TargetApi(21)
          public boolean shouldOverrideUrlLoading(WebView aWebView, WebResourceRequest request)
          );





          share|improve this answer

























          • Can you provide an example of this? The only documentation I was able to find was for api versions prior to api 24, and do not work in the SDK that I am using.

            – Androidguy1
            Mar 24 at 22:10











          • Edited the answer to add an example

            – Mohamed Abdalkader
            Mar 26 at 3:25











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55325439%2fhow-can-i-make-internal-links-load-within-webview%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          As the docs explains:




          returning true causes the current WebView to abort loading the URL, while returning false causes the WebView to continue loading the URL as usual.




          You should have logic in the method that checks the URL and returns false only if the url matches your expected URLs and starts the activity and return true otherwise.



          Something along those lines:



           WebView.setWebViewClient(new WebViewClient() 
          @Override
          @TargetApi(21)
          public boolean shouldOverrideUrlLoading(WebView aWebView, WebResourceRequest request)
          );





          share|improve this answer

























          • Can you provide an example of this? The only documentation I was able to find was for api versions prior to api 24, and do not work in the SDK that I am using.

            – Androidguy1
            Mar 24 at 22:10











          • Edited the answer to add an example

            – Mohamed Abdalkader
            Mar 26 at 3:25















          1














          As the docs explains:




          returning true causes the current WebView to abort loading the URL, while returning false causes the WebView to continue loading the URL as usual.




          You should have logic in the method that checks the URL and returns false only if the url matches your expected URLs and starts the activity and return true otherwise.



          Something along those lines:



           WebView.setWebViewClient(new WebViewClient() 
          @Override
          @TargetApi(21)
          public boolean shouldOverrideUrlLoading(WebView aWebView, WebResourceRequest request)
          );





          share|improve this answer

























          • Can you provide an example of this? The only documentation I was able to find was for api versions prior to api 24, and do not work in the SDK that I am using.

            – Androidguy1
            Mar 24 at 22:10











          • Edited the answer to add an example

            – Mohamed Abdalkader
            Mar 26 at 3:25













          1












          1








          1







          As the docs explains:




          returning true causes the current WebView to abort loading the URL, while returning false causes the WebView to continue loading the URL as usual.




          You should have logic in the method that checks the URL and returns false only if the url matches your expected URLs and starts the activity and return true otherwise.



          Something along those lines:



           WebView.setWebViewClient(new WebViewClient() 
          @Override
          @TargetApi(21)
          public boolean shouldOverrideUrlLoading(WebView aWebView, WebResourceRequest request)
          );





          share|improve this answer















          As the docs explains:




          returning true causes the current WebView to abort loading the URL, while returning false causes the WebView to continue loading the URL as usual.




          You should have logic in the method that checks the URL and returns false only if the url matches your expected URLs and starts the activity and return true otherwise.



          Something along those lines:



           WebView.setWebViewClient(new WebViewClient() 
          @Override
          @TargetApi(21)
          public boolean shouldOverrideUrlLoading(WebView aWebView, WebResourceRequest request)
          );






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 26 at 3:25

























          answered Mar 24 at 20:24









          Mohamed AbdalkaderMohamed Abdalkader

          251136




          251136












          • Can you provide an example of this? The only documentation I was able to find was for api versions prior to api 24, and do not work in the SDK that I am using.

            – Androidguy1
            Mar 24 at 22:10











          • Edited the answer to add an example

            – Mohamed Abdalkader
            Mar 26 at 3:25

















          • Can you provide an example of this? The only documentation I was able to find was for api versions prior to api 24, and do not work in the SDK that I am using.

            – Androidguy1
            Mar 24 at 22:10











          • Edited the answer to add an example

            – Mohamed Abdalkader
            Mar 26 at 3:25
















          Can you provide an example of this? The only documentation I was able to find was for api versions prior to api 24, and do not work in the SDK that I am using.

          – Androidguy1
          Mar 24 at 22:10





          Can you provide an example of this? The only documentation I was able to find was for api versions prior to api 24, and do not work in the SDK that I am using.

          – Androidguy1
          Mar 24 at 22:10













          Edited the answer to add an example

          – Mohamed Abdalkader
          Mar 26 at 3:25





          Edited the answer to add an example

          – Mohamed Abdalkader
          Mar 26 at 3:25



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55325439%2fhow-can-i-make-internal-links-load-within-webview%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현