Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to load or retrieve a webpage in both online and offline mode in android application?

I need to load and retrieve a HTML webpage in internal or external memory of android device. What i need is to download and retrieve a webpage in android using web-view.

There is lot of repeated questions similar to downloading or saving the webpage. But none of the answers helped me. Guide me!

Thanks in advance.

like image 599
sudharsan chandrasekaran Avatar asked Nov 25 '15 11:11

sudharsan chandrasekaran


People also ask

How do you make an Android app offline?

An app is not helping them in case of a weak network zone, connectivity issue, the immense loading time will let the users switch to another app. The main solutions available to make the app work offline are: Local storage/ database. Data synchronization.

How do I view web pages on Android?

String url = "http://www.example.com"; Intent i = new Intent(Intent. ACTION_VIEW); i. setData(Uri. parse(url)); startActivity(i);


1 Answers

I don't know is this solution suitable for your.if you want to view a website in offline mod and online mod you can use a web crawler to fetch all data from website.Here is an example project for android web crawler.after that you can load a website from url or local memory based on your internet Availability.

like image 142
Akhil Jayakumar Avatar answered Oct 24 '22 18:10

Akhil Jayakumar