Syncing data across platforms

gadgetmonster

Active Member
Licensed User
Longtime User
Hi All

I'm after a little advice really. I have in mind an app which will use an sqlite database on the android device. I would also like to make a desktop version of this app which would use it's own database.

Does anyone have experience in syncing data across platforms? I don't want to have to use an online database but perhaps make use of free cloud storage like Dropbox. I'm trying to get it clear in my head how data would be shared though.
 

gregwa

Member
Licensed User
Longtime User
If I understand your question correctly, you want to "sync" the database from the android device to the desktop program.

You could write code for the Desktop program that looks at a copy of the database from the Android device and then walks the database and checks for certain fields. If they aren't in the desktop copy then grab the data and insert it.

I do this with a recipe database I wrote for my wife. I can back up the database on my device, copy it to hers, then a subroutine within the program checks for recipes that I've added to mine and copies the data.
 
Upvote 0

gadgetmonster

Active Member
Licensed User
Longtime User
Thanks gregwa but I was looking for a method of syncing without having to copy databases around.

My thoughts at the moment are that it outputs xml files to dropbox. These files will be named using date and time (yyyy-mm-dd-hh-ss.xml). Synced devices would then retrieve all records since the last sync date and time. Not sure how the files would be searched yet.
 
Upvote 0
Top