3

I want to save the current site from my WebView from my app to an HTM(L) file. So when I press a button the current site that is displayed in my WebView, say http://www.google.com, is downloaded to the users phone in an HTM(L) file.

When this file is downloaded I want to display it on another moment in the WebView. I know how to display HTM(L) files in WebView but are there any things I should know.

So how do I download the current webpage from my WebView in an HTM(L) file?

Kara
  • 6,115
  • 16
  • 50
  • 57
nourikhalass
  • 360
  • 1
  • 2
  • 8

1 Answers1

0
  1. Get the content of WebView: How do I get the web page contents from a WebView?

  2. Write the HTML content in a file, let say index.html: http://www.anddev.org/working_with_files-t115.html

  3. Now you know where the file is located, so read the content of that file and display it in another WebView.

Community
  • 1
  • 1
Andy Res
  • 15,963
  • 5
  • 60
  • 96
  • You should paste some of that code here, instead of just linking to it. – you786 Jul 18 '12 at 16:24
  • I'm not going copy/paste one snipped of code from a thread, and post it here, if it already exists. If you are really are concerned about your problem, opening a link to another thread where a potential solution to your problem may be found, shouldn't be too hard to do. – Andy Res Jul 19 '12 at 08:24
  • I will post some code when i have the time. Anyway really thanks for your answer it helpt a lot. – nourikhalass Jul 19 '12 at 10:35
  • @AndyRes From StackOverflow's how to answer: "Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline." Just keep it in mind for future answers. – you786 Jul 20 '12 at 01:19