android - Sync server data with Mobile Application -


i have portal , mobile app

i want have proper mechanism data syncing server mobile application

i have 2 approches both not consistent.

below scenario clear question

suppose have 1 sql table testtable @ first android app call server api , server give him data in table testtable

if 1 record updated in testtable when after 1 hour mobile app again call api retrieve data has been updated , yet not sent particular device question how should maintain this

i have 2 approaches 1) add column name updatedatetime in testtable,and when mobile app calls api send , lastsync date time api return data updated after that

2)maintain table eg synctable keep record of each record in testtable , device , if send particular device update record synced

please me in both appproches not consistent both fail ayt point

is there other approach can use???

please comment if question still unclear. thanks


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -