Answer the question
In order to leave comments, you need to log in
How to update the base in the background?
Hey! I recently started learning android, I wrote my mini application and now the task is to synchronize with the server via http, that is, the algorithm is like this, I create an entry or update it directly from the application, I try to start synchronization, but in a separate thread if there is no access to the network or interruptions then do nothing with the server, if everything is OK, then give the data, you can get new ones and write it to the database. At the same time, the same synchronization task should be performed in the background by a timer (for example, once every 20 minutes), even if the application is closed. Here that interests:
1. What classes to use? Watched examples at all all on a miscellaneous
2. If the user addresses a DB and at this moment there is a synchronization in a separate flow what will be? mistake?
I can be wrong and choose the wrong words, correct me if anything, advise how you can do such a task.
Answer the question
In order to leave comments, you need to log in
At the same time, the same synchronization task should be performed in the background by a timer (for example, once every 20 minutes), even if the application is closed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question