we have an App which keeps some configuration data in memory. The configuration data is fetched from the server on start of the application. However, we would like this configuration to be updated from time to time (so new configuration data from the server gets propagated to the client). Our App does usually not stay in the foreground for very long.
According to the Android documentation, a background process can be killed to free some memory. However there seems to be no guarantee, that this will happen within a reasonable amount of time (say e.g. 4h). So the app might be alive forever, if no memory is required. https://developer.android.com/guide/components/processes-and-threads.html
Can we rely on Android to kill background tasks after some time? Or do we have to build a mechanism, to update the configuration data while the app is running?
Can you provide some documentation or well founded experiments for either one or the other side?
Best regards
Ben