Hey folks! I have what I think is a pretty common...
# multiplatform
i
Hey folks! I have what I think is a pretty common issue. I am building an app that will be connected to backend ktor servers from where it will get system data as well as create new data. The App will be fully operational offline. I'm planning to use either SQLDelight or Kodein DB to persist data on the device and when network is available it will send updates over the network to ktor servers storing state in a MongoDB. The issue is that you never know how long your app will be disconnected from the internet. Maybe you are going camping for the weekend. So it will need to persist the "RecordAdded"/Deleted/Updated events and send them when they are reconnected. Are there any libraries to do this? Some sort of polling solution that will attempt updates and only delete the local events when the update is successfully? Thanks in advance!
l
following this thread. we currently do this in our android app and use workmanager to to batch out CRUD events that have been persisted. not sure what the kmm solution will be for this yet though.
i
Something like that is exactly what I'm looking for. Honestly I'm surprised that workmanager doesn't have native support
a
you can always just roll your own and back them with backgroundtasks on ios and workmanagrr on android