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 8196215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:24:33+00:00 2026-06-07T05:24:33+00:00

I am right now working on an app which works as a book-stack,where user

  • 0

I am right now working on an app which works as a book-stack,where user can read books of their choice,now what i am doing is,displaying the html pages that i’ve made,in a web-view in my application.
Now this application works only if the user has full time internet connection on his phone.
What exactly i want is when they first open the application,they would need internet connection and then the app should be able to download that page and store it in local database so the user can read it later on without having any internet connect.
So is there any possible way to download the html page and store it in local database so user can use the app even if he is not connected to internet?
I can post my code here if needed be.
Any smallest tip or help would be really great as i am stuck here since long now:(

EDIT 1:

So i successfully downloaded the HTLM page from the website,but now the problem that i am facing is,that i cannot see any of the images of the downloaded html. What can be a proper solution for this?

  • 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-06-07T05:24:35+00:00Added an answer on June 7, 2026 at 5:24 am

    Here what’s the mean of “Local Database“?

    Preferred way is download your pages in either Internal Storage(/<data/data/<application_package_name>) (by default on non rooted device is private to your application) or on External Storage(public access). Then refer the pages from that storage area when user device has not a internet connection (offline mode).

    Update: 1

    To store those pages, you can use simple File read/write operation in Android.

    For example:

    String FILENAME = "hello_file";
    String string = "hello world!";
    
    FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_PRIVATE);
    fos.write(string.getBytes());
    fos.close();
    

    This example store file hello_file in your application’s internal storage directory.

    Update: 2 Download Web-Content

    HttpClient httpClient = new DefaultHttpClient();
    HttpContext localContext = new BasicHttpContext();
    HttpGet httpGet = new HttpGet("http://www.xxxx.com");
    HttpResponse response = httpClient.execute(httpGet, localContext);
    String result = "";
    
    BufferedReader reader = new BufferedReader(
        new InputStreamReader(
          response.getEntity().getContent()
        )
      );
    
    String line = null;
    while ((line = reader.readLine()) != null){
      result += line + "\n";
    }
    

    // Now you have the whole HTML loaded on the result variable

    So write result variable in File, using my update 1 code. Simple.. 🙂

    Don’t forget to add these two permission in your android application’s manifest file.

      <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
      <uses-permission android:name="android.permission.INTERNET"></uses-permission>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on an app right now where I have Individuals, Athletes and
I am currently working on a web-app/server in python and cherrypy. Right now, I
Im working right now on a program that can divide, add, ect, but, im
Right now I am working on a stub of a project. In the course
Right now I am working on one Real Estate Website, In that website I
Right now I am working on a dll project with several handy .net tools.
Right now I'm working on a program that throws up a bunch of separate
It doesn't seem to be working right now. I get a java.lang.NullPointerException I have
I'm new to web development. Right now I'm working on a login feature on
I am newbie in JS. Right now i am working on an effect in

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.