I succeeded in downloading it from webview...
If you press down on your phone, on the screen you want to download,
Proceed to the main Internet window.
If you press Back, you'll be moved to the download location... <
This is the only code I've added.
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 just want to stop at the screen I downloaded. For help ^
^For your information, if you download it on the web, you just download it from the window ~^
~^ android
The onDownloadStart() function creates a screen transition because the code is written to display a new screen as startActivity(). Delete the above code and implement it by referring to the shouldOverrideUrlLoading()
function in the following link.
© 2024 OneMinuteCode. All rights reserved.