parse xml after some time android
In my app i need to parse the XML file & display info on activity. just like stock market as & when information at server got updated i need to parse the xml & display the info.I need to hit the server af开发者_如何学Cter 5 minutes & display the updated info on activity. I have tried using AsyncTask & timer but something going wrong.If any one is having demo then please provide link,tutorial..
It's extermely urgent..
thnx for any help....
Sounds like you want to run a polling loop in the background? You should be able to use a timer to kick off the check and an async task to actually request/parse. There's a bit of complexity in setting up the timer handling, the accepted answer to this question should help however:
How to get XML using AsyncTask and Timer?
精彩评论