So thanks to help yesterday, I can now parse the xml file I need. Today I would like to be able to download this file through the app, so it can then be parsed.
I've got what looks to be the code I need. It doesn't throw any errors at least and looks like this -
It is then called by this code -
The problem is, it does flag a runtime error as clearly I need to extend AsyncTask. I've tried to do this, but can't seem to get the code right. How should it look?
Network access should always be done in the background on Android, so as not too block the main thread for an indeterminate amount of time. AsyncTask is one way to do this, but you can also start a thread something like this:
Hi guys, just posting to say thanks for the help. I did some research on DownloadManager and currently I'm downloading the xml to the Downloads folder and parsing it from there. Perhaps at somepoint I'll look into parsing it direct from the http source, but for now it works at least!
She said she got a brazillian. I think owning people is wrong. That is how I learned ... tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!