android
android copied to clipboard
Remove foreground worker for auto upload
To help with reliability, we started using a foreground worker to scan the file system for changes. This is not good practice and we should try to get rid of the foreground worker since it leads to this issue for example.
The goal would be to change the auto upload mechanism to make it resumable (if the worker gets stopped by the system, it should not start scanning from scratch) and reduce the probability for the worker to get killed.
To do this the plan is to:
- Create separate worker for each SyncFolder (so each worker runs for less time)
- Change logic to keep track which files were already scanned lately