Save webview content for offline browsing?

At least for basic pages, this should be possible.

(1) Download the HTML file instead of loading it directly into the WebView. Then use WebView.loadData() or WebView.loadDataWithBaseUrl() to load the page into the view. Don't trash the html, you'll need it later.

(2) Set your own WebViewClient which overrides [at least] onLoadResource(). Then save every single resource requested by the page.

(3) Now you have the HTML stored, and all the necessary files on the filesystem. Search through the HTML for absolute paths, you'll want to update these with a replacement function so they are either relative paths (and will work on the filesystem) or absolute paths to where you saved the images/css/etc. (on the filesystem)

(4) Write the html to the filesystem.

I hope this helps.

Alternatively, you could probably save the page as an image, essentially taking a screenshot of the WebView. This wouldn't allow for copy/paste, or clicking of links, but it would be much simpler if all you need is "view this again later".