Data for Android

7 views
Skip to first unread message

Mix and Mash Admin

unread,
Aug 9, 2011, 4:41:49 PM8/9/11
to Mix and Mash Data Mashups
[redirected from Mix and Mash Creative Remixes google group]

I need help trying to get data from the web into an android app. Is
there anyone out there i could hassle for advice. Especially to do
with the common nz api s such as infoconnect

Chelsea

unread,
Aug 9, 2011, 4:43:29 PM8/9/11
to Mix and Mash Data Mashups
Hi,

I'll ask around and see if I can point you in the right direction.
In
the meantime have you seen the Beginner's guide to data mashups on
our
website? http://mixandmash.org.nz/the-competition/mashup-guide/

Will be in touch shortly.

Chelsea
Mix and Mash Community Manager

malclocke

unread,
Aug 11, 2011, 12:06:59 AM8/11/11
to Mix and Mash Data Mashups
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

On Aug 10, 8:41 am, Mix and Mash Admin <i...@mixandmash.org.nz> wrote:

James

unread,
Aug 11, 2011, 2:10:03 AM8/11/11
to Mix and Mash Data Mashups
Thanks for the example there malc. cheers

On Aug 11, 4:06 pm, malclocke <malclo...@gmail.com> wrote:
> 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 inspirationhttps://github.com/malclocke/ChristchurchMetro.
Reply all
Reply to author
Forward
0 new messages