Depends on what you want to do. There are a few general guidelines:
- You'll need to use AsyncTask or a thread for any calls you make to
external API's to avoid the 'Force close' dialog.
- If you want to persist any data locally, use the SQLite database
adapter.
- Android has a built in SAX XML parser that is pretty fast.
My Christchurch Metro app queries an XML endpoint and uses the
techniques above, and is open source so you can have a look at that
for inspiration
https://github.com/malclocke/ChristchurchMetro.
However, I make no guarantees that it uses best practice in most
cases.
For example, it persists all of the bus route and bus stop data to an
SQLite DB, because these are stored in very large XML documents that
are too big to parse for each request. However, querying a bus stop
for real time arrivals is done live, as it's a fairly small XML doc.
Malc