Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6628759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:09:47+00:00 2026-05-25T22:09:47+00:00

I am creating a app and using WebView for open URL. I see some

  • 0

I am creating a app and using WebView for open URL. I see some apps offer “Save Page”(A web page) option to user.

I want to know how to Save a page from my WebView so that I can show it to user when it request.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T22:09:48+00:00Added an answer on May 25, 2026 at 10:09 pm

    Maybe using a cache is the best way… for that you should check http://developer.android.com/reference/android/webkit/WebSettings.html

    “Manages settings state for a WebView. When a WebView is first
    created, it obtains a set of default settings. These default settings
    will be returned from any getter call. A WebSettings object obtained
    from WebView.getSettings() is tied to the life of the WebView. If a
    WebView has been destroyed, any method call on WebSettings will throw
    an IllegalStateException.”

    Especifically:

    public static final int **LOAD_CACHE_ONLY**
    

    Since: API Level 1
    Don’t use the network, load from cache only. Use with setCacheMode(int).
    Constant Value: 3 (0x00000003)

    Or

    public static final int **LOAD_CACHE_ELSE_NETWORK**
    

    Since: API Level 1
    Use cache if content is there, even if expired (eg, history nav) If it is not in the cache, load from network. Use with setCacheMode(int).
    Constant Value: 1 (0x00000001)

    Update1:

    hmm “crappy code of all life” for example:

    public static InputStream fetch(String url) throws MalformedURLException,
            IOException {
        DefaultHttpClient httpClient = new DefaultHttpClient();
        HttpGet request = new HttpGet(url);
        HttpResponse response = httpClient.execute(request);
        return response.getEntity().getContent();
    }
    
    
    private static String convertStreamToString(InputStream is)
            throws IOException {
    
        StringWriter writer = new StringWriter();
        IOUtils.copy(is, writer, "UTF-8");
        return writer.toString();
    }
    

    So, you can fetch a url with InputStream fetch(String url) an then convert that stream to String with private static String convertStreamToString(InputStream is) and save that stream to a file, later you can load that content to a webview….. to read later

    Update2:

    Or you can do some Java Serialization stuff… cant remember if this work on android xD

    Discover the secrets of the Java Serialization API http://java.sun.com/developer/technicalArticles/Programming/serialization/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using codeigniter to create a web app. I'm creating the drop down menus
I'm creating a web-browser type app (using a web view object) that needs to
I'm creating a web app using PHP and PostgreSQL. Database are too big and
I'm currently creating a web app using Google's oAuth. I was wondering how I
I am creating a web app using C# 4.0. Mysql is being used as
I'm creating web-app using JSR286, Struts2 for portlets on WebSphere Portal 6.1.5 The problem
I'm creating a web app using Spring 3 and would like to harness the
I am creating a SAAS app using Rails 3. When a user creates a
I am creating a web app using asp.net and c#. I am using gridview
I'm creating a Web app using plain GWT (no wrappers such as GXT). The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.