0

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 :)

Max
  • 319
  • 1
  • 4
  • 18
  • 2
    I'm sorry, but this question is far too vague and broad. You seems to have a reasonable idea of what you want to achieve. Why not get started? Don't overthink it. Just get something going. You'll hit on certain issues as you go along. And when you do, ask a far more practical question about those. – Bart Jan 30 '14 at 21:07
  • I just don`t know where and how to start. To do honest Thats the first time I ask this kind of questions... – Max Jan 30 '14 at 21:15
  • Well, where in your process are you stuck? Are you a first-time programmer? First time Android programmer? First time trying to download something from an app? What is your starting point? – Bart Jan 30 '14 at 21:17
  • I`m learning android development for almost 2 months and I already have an app. but now all my files are hardcoded so as you said- First time trying to download something to the app. – Max Jan 30 '14 at 21:25
  • Then try to figure that out. And if you get stuck, focus your question on that specific problem. You'll have a far better question than your current "how do I create this app?". – Bart Jan 30 '14 at 21:29
  • Again, I stuck because I don`t know where to begin. Just give me this start- what should I learn? Or even tell me what to google first- That will help and thats what I asking for. Thank you. – Max Jan 30 '14 at 21:33
  • Would some of the information here help you get started? http://stackoverflow.com/questions/3028306/download-a-file-with-android-and-showing-the-progress-in-a-progressdialog – Bart Jan 30 '14 at 21:34

1 Answers1

1

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!

JanBo
  • 2,925
  • 3
  • 23
  • 32