0

I am currently using Apache Cordova with Visual Studio 2015 for my mobile app development. I am also using Genymotion emulator and a Sqlite Database.

I noticed, if I am to use two different devices(Merchant POV & Consumer POV) to demonstrate my app, the database I will be using will be not be a synced database due to it being two different devices.

Is there any way I can make sure that both devices are using a synced database?

CodeName
  • 559
  • 2
  • 6
  • 23

1 Answers1

1

You would need a custom sync API to synchronize data like that. But if you are only in the early stage of testing your local database, you can make a script that loads some sample data wich will be executed on opening of your app. That way any device will run the same script and then have the same sample data.

But if you want to insert data on a device and then have that same data on another, you will have to sync it with your API.

hope it helps

theyouishere
  • 177
  • 2
  • 11
  • Do you have any recommended sync API or tutorials for it? Thanks mate! – CodeName Jul 12 '16 at 13:10
  • Well there is definitely some work if you are new with APIs, but it is so fun to learn because you touch to the back-end of a "real app". http://stackoverflow.com/questions/671118/what-exactly-is-restful-programming here is a little answer about REST API. Have fun ! – theyouishere Jul 12 '16 at 13:38