0

I have an application which pulls its data from a local XML file. However, the data changes overtime and I am looking for a way to update it without updating the whole application.

My main goal is to create an update method which would connect to Internet if such connection is possible and update the application so that the next time the application is launched without Internet access it would display the latest version of data.

Since Android application files are in read only state I need some sort of workaround. I am thinking of two possible approaches. First one is to download an extra file and work with it, and the second is to utilize a SQLite database.

So my questions are:

  • Is it possible to create application with updatable information?
  • If so what is the right approach to accomplish this?
Brigham
  • 14,395
  • 3
  • 38
  • 48
PovilasID
  • 883
  • 10
  • 34
  • Check this question and my comment http://stackoverflow.com/questions/12421161/optimize-android-database-update-sqlite-from-web-service it doesnt contain answer but it could show you how to start... I mean you need webserver with db build webservice which produce some json with updated data and then you have to get this json onandroid parse and update local sqlite db – Selvin Oct 09 '12 at 20:59

1 Answers1

0

I think you should use a "Fridge".

When first launch, take default data and store it in sd card or internal storage, and replace these data when an update occurs.

ChristopheCVB
  • 7,269
  • 1
  • 29
  • 54
  • 1
    Be sure not to brown off the user by creating some random directory, *Pro Tip* Use Android/{your_package_name} on the sdcard for storage of any data! – t0mm13b Oct 09 '12 at 21:31