Hello all, I am new to this board and Android altogether, and I have
some issues with caching that I really hope you guys can help me with.
My problem is that my application needs to manually store webpages for
offline access, (that means Images, css, javascripts, and so on). My
current approach is trying to get all the Download Requests made by
the webview and save them, then every time the page gets reloaded, I
would simply redirect each request to my saved files (if they exist).
First thing I need to do is to get all the requests, and I do it this
by implementing the onLoadResource function on a WebViewClient, them
adding it to the webview:
public class WebViewClientOfMine extends WebViewClient
{
@Override
public void onLoadResource(WebView view, String url) {
super.onLoadResource(view, url);
Log.d("WebViewClientOfMine","Requesting: " url);
}
}
Later:
myWebView.setWebViewClient(new WebViewClientOfMine());
Now to save the files is easy, my problem is:
Is there ANY way to redirect the requests? Or is that a bad approach?
can you guys help me with any better ideas?
Thanks!
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en