I am using the jsPDF to convert the html to pdf file. In websites it works fine but in android webview
when clicking a button it only reloads the page. I searched all but nothing works fine.
I added the below code in main activity:
mWebView.setDownloadListener(new DownloadListener() {
public void onDownloadStart(String url, String userAgent,
String contentDisposition, String mimetype,
long contentLength) {
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
}
});
I am new to android.
Please help me to find it.
Thanks in advance.