I have an android app that feeds on an xml file that is generated in my server with Ruby on Rails.
I want to download the new version of the xml file only when the it is newer than the one I have previously downloaded.
I would like to know what is the best way to do this in both sides: generate the version of the xml somehow somewhere in the server and obtain the version of the file using android.
Right now I am downloading an xml with the last day of modification of the xml I want to download an in that way compare it with the one I have locally, but I don’t think this way is very efficient. Can you suggest any other way to do it?
Thanks in advance
instead of pre-generating the XML file and then downloading it you can generate it upon HTTP GET request, from the Android app you can pass a parameter in the URL that represents a version or the last update time.
then your server can check by this parameter if a new version should be generated.