E
E
ENGRU2015-11-12 11:23:04
Android
ENGRU, 2015-11-12 11:23:04

Synchronization of xml files of an android application with server files (internet)?

Good afternoon.
There is an application with data that is taken from xml files built into the application (res / xml). The essence of the question is as follows: How to check the xml files of the application with the xml files of the server ( http://domain.ru/blablabla) and replace the files in the application with files from the server. That is, if the files on the server are larger, or the date of creation is later, then the application should download these files and replace their own.
Tell me how to implement this, or poke some in the description.
Direct parsing of data from the site does not attract the obligatory connection of the device to the Internet.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg Gamega, 2015-11-12
@ENGRU

firstly, everything in res/assets is read-only
even if it were possible to replace files in res, how do you see it without the Internet?
if you just need data, then store it in a database and, depending on the task, update it using the rest api or, if you really want to, download a new database

E
ENGRU, 2015-11-12
@ENGRU

even if it were possible to replace files in res, how do you see it without the Internet?

Well, to update or not, in my understanding, the user would decide when accessing the Internet. Depending on whether he wants to receive new information or not. That is, it may not update and use the program without the Internet with old data.
Thank you for your answer and

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question