I am working with an API that is used to sync bigger amounts of data (JSON arrays mostly, later maybe also images) to the device. Unfortunately there are lots of endpoints to call to be able to collect all required data, so it is quite a complicated process.
How should I implement such a “background process” in general?
The user should be able to use the app as normal, and the views will handle the missing data just fine - I am just not sure how I can make sure the process is started and then running until it is finished, even if the app is closed while it is running, the user stops using the app etc.
I am thankful for any pointers or links that help. Thank you.