I need to implement Microsoft sync framework with my android App. I took help from here
Android example with Microsoft Sync Framework toolkit.
Updated Link: SyncFrameworkAndroid
But still i did not understand the working flow.
Anyone have any idea how to integrate Microsoft sync framework with android app to sync sqlite db to SQL server.?
Yes . We have integrated this long back. It works simply on REST endpoints. Azure will expose the CRUD operations as REST API's.
On android side we need to create a java class for each table as we do for ORM.
Sync works on the basis of timestamp. There is no call called SYNC. It's basically PULL and PUSH. We have to PUSH our changes before we pull. (Not as we do in GIT pull then push). Note that order does matter. You have to sync the table in order.
Parent first then child. Else you will get in to trouble on data with relationships.
We were working on this long back. At that time azure android library has a lot of bugs. Hope it'll be fixed now. I will update a sample code soon and attach here.
You can pull the android SQlite DB outside and view the structure. It'll give a better understanding on the internal implementation. If I remember correctly. There is a table holding the changeset in local in the below format
TableName, Primary Key, Action(Modified, Created, etc), Time
On pull you can specify the action to take on conflict. Means there may be multiple users who have changed the same data. So who has preference can be set as Merge Strategy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With