1

I need to save page from webview then open it in webview. I found method saveWebArchive and wrote code:

        Timestamp tm = new Timestamp(new Date().getTime());
        String fileName = String.format("web_file_%d.mht",tm.getTime());

        String path = dir.toString() + File.separator + fileName;
        view.getWebView().saveWebArchive(path);

then I load page where model.getContentPath() is path from code above

webView.loadUrl("file:///"+model.getContentPath());

and I got page without CSS styels etc... Can you say how to save and load page which will be looks like original from web?

Abbath
  • 1,002
  • 13
  • 30

0 Answers0