title: How to set WebView permission for all domain like google map link whatsapp chat link
body: <p>hey I'm new on android studio im making webview app. my app working perfectly on same domain but when i open other domain links then not opening. <a href="https://i.stack.imgur.com/xVifP.jpg" rel="nofollow noreferrer">App Error Screenshot </a></p>
  <p>ex. <strong>example.com</strong> is my main webview app URL. website lode and work perfectly on this domain but when i want to open other domain link like <strong>secondexample.com</strong> or other domain sites then website not opening. here is my code please help I'm stuck on this i reserched about this but no solution find.</p>
  <pre><code>public class MainActivity extends Activity {
      private WebView mywebView;
  
      @Override
      protected void onCreate(Bundle savedInstanceState){
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          mywebView = (WebView) findViewById(R.id.webview);
          WebSettings webSettings = mywebView.getSettings();
          webSettings.setJavaScriptEnabled(true);
          mywebView.loadUrl(&quot;https://nishaboutique.online/&quot;);
  
          mywebView.setWebViewClient((new WebViewClient()));
  
          // Improve performance
  
          mywebView.getSettings().setAllowFileAccess(true);
          mywebView.getSettings().setRenderPriority(WebSettings.RenderPriority.HIGH);
          mywebView.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
          mywebView.getSettings().setAppCacheEnabled(true);
          mywebView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
          webSettings.setDomStorageEnabled(true);
          webSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS);
          webSettings.setUseWideViewPort(true);
          webSettings.setSavePassword(true);
          webSettings.setSaveFormData(true);
          webSettings.setEnableSmoothTransition(true);
      }
  </code></pre>