molleman
molleman

Reputation: 2946

how to update information within an android application

I am developing an android application for a website of restaurants. the number of restaurants is 190. So (externally from the app)i scrape the website for information on each of the restaurants. this data is placed within an xml file. I then place this within my application package. i parse the xml file and create restaurant objects and populate a list view with all the restaurants.

As you can see this xml file cannot be updated with new information if more restaurants are added to the website.

what would be the best way to be able to update the information from the website.

What would the best practices be?

Upvotes: 0

Views: 167

Answers (1)

dontocsata
dontocsata

Reputation: 3071

You can have the device scape the website and create the XML itself every so often (like every day or every time the app is started, depends on how much data there is). You might be able to get away with scraping/generating in the background while the user is browsing the list, and then update the list once you've completed the work.

Otherwise, you'd have to host a site and set up some cron job to scrape and generate the XML. Then have the device download the XML you generated every so often.

Upvotes: 1

Related Questions