Hi! While learning about Android App Architecture ...
# android
m
Hi! While learning about Android App Architecture I've found the Now in Android github repository and started studying the codebase. I've found the Offline First Pattern and I didn't comprehend the
ChangeListVersions
on DataStore core module. This data class is used on Synchronizer : https://github.com/android/nowinandroid/blob/5ba16edde991ab39bec27283a85072b5d3750[…]com/google/samples/apps/nowinandroid/core/data/SyncUtilities.kt It's something related to server and local should match the entities's version, but I didn't understand what should have the server returns to keep the sync and how the api should work on this case.
not kotlin but kotlin colored 2
c
Image from iOS.jpg
👮‍♂️ 1
🫡 1
t
Oh hi! I wrote this. The implementation does not matter here. In our case, for every write to the db the server has a change list. he app just checks its local that change list with the server to see what changed and syncs from there. If you don't have a server that supports change lists, your best bet is to delete all local data when you refresh anfter you've fetched new data