title: Android webview download data/text file
body: <p>I have developed an android webview and trying to download a generated data:text file upon click on the link in webview.</p>
  
  <pre><code>    webView.setDownloadListener(new DownloadListener() {
          @Override
          public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimeType, long contentLength) {
              DownloadManager.Request request = new DownloadManager.Request(
                      Uri.parse(url));
              request.allowScanningByMediaScanner();
              request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
              request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, "download");
              DownloadManager dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);
              dm.enqueue(request);
          }
      });
  </code></pre>
  
  <p>But, i'm getting the following error exception:</p>
  
  <pre><code>java.lang.IllegalArgumentException: Can only download HTTP/HTTPS URIs: data:text/vcard;base64,qadsasffaefqawdfafafasdasdasdasdadasd
  </code></pre>
  
  <p>Is there any solution for this? Thanks in advance.</p>