I want to make an android application which has a webview layout. This is the criteria of my application:
The first time the application starts, webview loads an url (maybe facebook, google, etc..) webview.loadUrl("http://www.google.com");
After it loads the url, the application saves the loaded url to HTML View (file.htm) in a "specific place" in android's internal storage. So, let's say i open "google.com", the application saves the google's web page to HTML file (let's say the filename, "google.htm"), and when i go to that "specific place" and click the "google.htm" file, it shows the google web page using android's HTML Viewer.
When the application starts again, or simply say the application loads the url again (in this case, "google.com") , it doesn't take from the "google.com" page BUT it takes from the "google.htm" file on the internal storage android. So from the user's view, that application can still load webpages, even though it's not connected to internet.
To make it simple,
- Application Start -> Go to the specified url -> Check the storage
- IF there's the specified url HAS the HTML file in the storage, then load from the storage
- ELSE it loads the url from the web.
Can anyone help me with the code and explanation? I really appreciate it. Thanks guys :D
See Question&Answers more detail:os