I have created a WebView instead of directly linking to a link because the website has complicated redirect checks that prevent me from directly linking. However, in order for the download to complete, users have to long click on the link and save it. Users are confused. They think its broken.
I was wondering if it would be possible to somehow comprehensively obtain all the information that the WebView has pertaining to that session, and pass it to the HttpClient and if I could then intercept and download the file. My worry is that even if I could somehow start the download the file with HttpClient, I would have the same problem as before when I was attempting to manually set the referer headers to no avail.
Any chance that http://developer.android.com/reference/android/webkit/WebView.html#setDownloadListener(android.webkit.DownloadListener) might help you?
Perhaps in combination with http://developer.android.com/reference/android/webkit/CookieManager.html and/or http://developer.android.com/reference/android/webkit/CookieSyncManager.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With