Question

Ok, Maybe the question is too general but I really need help... The problem is that my app will contain thousands of textpages and I just can`t make it hardcoded. So I decided to make it a hybrid app. I want to download HTML files from the server to the device and make my app automatically read these files also with an option to update them later.

Here is how it`ll work: http://img836.imageshack.us/img836/9923/jsct.png

What is the simplest way to do this? Thank you :)

Was it helpful?

Solution

I agree with the above comments that the question is to broad and that you should start and ask when you hit specific problems, but here a few hints.

  1. You need to download the file from url.
  2. Open it in editor, edit it, save it...
  3. Upload them back to the server.

If you divide your app into sections you will get specific problems you can focus on.

So just with the above you can search for options and try to:

Download a file from internet( HTTP GET with DefaultHttpClient for example...google it ;) )

Save that file

Open it in default text reader, which will handle editing and saving.

saving the file paths in your app through SharedPreferences ( another google question ;) )

Uploading the file

and so on....

I know its hard if you dont have experience but start with the little things first, maybe just opening a file, just downloading a random file, and soon you will be able to put the pieces together like a puzzle.... good luck!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top