0

I am currently building an ordering application where users can send orders for available items. It must have the functionality to work offline as well. After user is online, the user has the sync button to sync his orders with the back-end. In the device I'm planning to use SQLite. It has the entities like orders and order items.

Currently I'm stuck with the problem of syncing.

I planned it like this. When the user clicks the sync button and if the app is online the newly updated and created fields on the back-end database data is returned to the app (the app sends the last sync time to the back-end). Then the app compares its data with the returned data (with created_at, updated_at time fields). Then sends the newly updated data to the back-end and update the current local database.

There can be conflicts with the back-end database. I'm trying to resolve conflicts in the app it self.

How to solve this issue. Is there any service that already implemented to solve this issue in React Native?

1
  • You have an app. that saves up pending transactions. Then it tries to. send the. pending. transactions. to. the. service, which. either accepts or rejects them. The. app then displays status or lets. the user decide what. to do with. rejected. transactions. Where's the. problem? – joshp Oct 6 '20 at 22:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.