android - Check if need to update the local data(Web Service) -
i have android app , need improve both performance , request internet. have web service in .net.
when enter in profile of person need download profile again, want verify if need download profile(new data).
i thinking make date column , whenever modifies profile, update column date. in android, load localdb , verify if "update date" of local same remote db(web service) , if not download data api.
its right way do? better approach? maybe using int verify "the version of profile"?
thank you
you can't know on local device happening on web server without contacting it. cache profile in android memory cache or database, , call web service in background check new data.
i cache profile on server, on web service because performance other consumers of web service if have (like web app). when change profile(inside post or put method don't forget invalidate cache). when receive new profile web service update database or cache again in android.
Comments
Post a Comment