I had worked on similiar kind of app. The idea is how you structure your DB. In this case along with all other attribues in table add one more attribute say isSent which is a bool value. By default this should be false and should only be set to true when it is updated on server.
This will help in finding out which item are not synced to the server and send only those items whose isSent is false.
Now how your app will get to know once item is updated on server? For that your server should sent back the request you have sent with the success message for each request. You request can be an array of items or a single request depends on the requirement.
Azure sync table also works in the same fashion. When you first create an item it is stored in your offline DB with isSent as false then that request is sent to server, when server send the success isSent is updated to true.
Lets see an example of this:
Suppose you are commenting in offline. Each comment will be considered as separate item. So when you are connected to internet these all request will be send and each item will have its unique Id to differentiate with other. Your request to upload to server will be:
[
{
"unique_id" : 1,
"Comment" : "Hello"
},
{
"unique-id" : 2,
"Comment" : "How r u"
}
]
Now response from server should be:
[
{
"unique_id" : 1,
"Status" : "success"
},
{
"unique_id" : 1,
"Status" : "failed"
}
]
Parse your response and based on Status update the isSent column of your DB accordingly.