I don't know if this is the right chnnel. Ok i hav...
# android
g
I don't know if this is the right chnnel. Ok i have to develop a sync local to remote on Android. I have a local db room and i have to get data and send this data via cloud and update db room with new data from cloud. I create a repository and of couse i have to use Coroutine but i don't know wich Scope because i can't use viewModelScope because sync have to work always and don't want to cancel when UI and viewModel are destroyes
not kotlin but kotlin colored 2
j
You'll probably want to schedule the sync work using WorkManager.
g
no sync starts every time user changes local data so when db changes.
j
Yes, and it should be run with WorkManager when the sync is needed.