title: Opening a .pdf link in a Webview
body: <p>I have a simple app with a webview.
  Every time there is a PDF link on a page, after clicking it nothing happens. 
  I am currently strangling with pdf links, they wont open no matter what. I tried some solutions but they just seam outdated. </p>
  
  <p>Here is my code :</p>
  
  <pre><code>package com.example.bla;
  
  import androidx.appcompat.app.AppCompatActivity;
  
  import android.app.Activity;
  import android.content.ActivityNotFoundException;
  import android.content.Intent;
  import android.net.Uri;
  import android.os.Bundle;
  import android.os.Environment;
  import android.webkit.WebSettings;
  import android.webkit.WebView;
  import android.webkit.WebViewClient;
  
  
  
  import java.io.UnsupportedEncodingException;
  import java.net.URLEncoder;
  
  public class MainActivity extends AppCompatActivity {
  
      private WebView webView = null;
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          webView=findViewById(R.id.webviewid);
          WebSettings webSettings = webView.getSettings();
          webSettings.setJavaScriptEnabled(true);
          webSettings.setJavaScriptCanOpenWindowsAutomatically(true);
          webSettings.setDomStorageEnabled(true);
          webSettings.setPluginState(WebSettings.PluginState.ON);
          webSettings.setAllowFileAccess(true);
          webSettings.setLoadWithOverviewMode(true);
          webSettings.setUseWideViewPort(true);
          webSettings.setAllowUniversalAccessFromFileURLs(true);
  
          webView.setWebViewClient(new WebViewClient());
          webView.loadUrl("https://blabla.com");
  
      }
  
  
      public void onBackPressed() {
          if (webView.canGoBack()) {
              webView.goBack();
          } else {
              super.onBackPressed();
          }
      }
  
      }
  </code></pre>
  
  <p>Can you please help me with a solution?</p>