How to save(download) HTML page with all images, css etc in Android?


Tags: android,html,css,save

Problem :

I am developing Android application which is used to open pages from wiki resource. I want to save that pages to watch them later. So, is there a possibility to do it using libraries - write my own html-parser is a bit complicated for me.



Solution :

You could use the DefaultHttpClient as the response will hold all the data.

Here's the basic syntax:

HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet('http://www.somedomain.com/somePath');

try {
    HttpResponse response = client.execute(request);
    // store the response afterwards
} catch ([…]) {
    […]
}

More information can be found here: Android Developers | DefaultHttpClient.


    CSS Howto..

    How to use non-online images in CSS?

    How to make HTML design of a website extensible, reusable and flexible?

    How to change the colors of a website in real time?

    CSS visited links- how to recognize visited links which visited by clicking through my app?

    jQuery - How to get all styles/css (defined within internal/external document) with HTML of an element

    How to make an inline-block box stick to the top? [duplicate]

    How to ensure that the css border goes inside the image

    How can I inline the label with the input horizontally and the inputs vertically

    How to make an iFrame window scrolls with overflow:hidden?

    How to change button colors upon click (Javascript)?

    How to reference / link to a Css-File styling elements in a webview for Android

    How can I center my ul li list inside my div?

    How to use HTML classes and ID's

    How can I move all my CSS box shadows back under div

    List-style: how to hide that extra empty space

    How to apply @media for css attribute that are set via jquery

    How to use css3 transition on hover for td?

    How do I append jumping dots to a text in html and css

    How can i apply css rules dynamically in a div after the user enters the rules [closed]

    How to change CSS portrait to landscape in iphone?

    Show bootstrap glyphicon in link when hovering

    How to get all CSS of element

    How to make background image with aspect ratio in html and css [closed]

    How to center a ul CSS

    CSS or Jquery how to position image in the middle of an li element?

    How to give same style to first 2 paragraphs differently in css

    Does anybody know how I can adjust this CSS to achieve the desired hyperlink effect I'd like?

    How to Fix: iOS drops CSS files when javascript changes DOM

    How to implement :root { font-size: calc(100vw / 40); } to scale font-size(s)

    how to make div fixed and ot move upon window resize