-3

I want to make a android app white play times of the cinema in my land. All the data is in xml on my server (php) but now i need to download the data to my folder on the phone. I want download and not parser so wen the user is offline the data is still ther.

I have tried manny online examples but they give me all a error: https://i.stack.imgur.com/r1Dyd.png

What is the best and easy way to make a download. I now php, sql, javascript, jquery, but no java. I learn from making thins ;)

Greatings Christophe VD

user3142817
  • 787
  • 2
  • 9
  • 15
  • possible duplicate of [android.os.NetworkOnMainThreadException](http://stackoverflow.com/questions/6343166/android-os-networkonmainthreadexception) – ben75 Dec 12 '14 at 14:12

1 Answers1

0

You are trying to start network task from main UI thread. Look at this error in the logcat

caused by android.os.NetworkOnMainThreadException

Try your code samples again but wrap it to anync task before. Like this: https://stackoverflow.com/a/6343299/4186991

Community
  • 1
  • 1
Vika L.
  • 265
  • 1
  • 11
  • i have add it but i get a new error class downloaddata extends AsyncTask { protected Download doInBackground() { http://s17.postimg.org/cawz3x7z3/test.png – user3142817 Dec 13 '14 at 20:29