• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

Android SQLite

 
Ranch Hand
Posts: 41
Python Angular Framework Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
I am a beginner in developing android applications.
I want to build an application that has a local database in it, as i know so far , i should use the SQLite databases. i am ok with that,
but i want to understand how should i manage data synchronization between the application and the server, in other words, my application has a
local database which represents a "cache" for the online database - so it has to be synchronized with changes on it.

What is the best practicies for managing this operation?
In which cases should the application request data from server , and in which cases it simply loads them from the local database ?
I am looking for taking advantage of the local database on the best way.
 
Bartender
Posts: 7488
171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the synchronization only ever happens from the server DB to the local DB, and never the other way around, the app should just work with the local DB. Whenever there are updates on the server that the device needs to get (that may or may not be all updates) the server can send a GCM notification to the app, containing either the updated data if it is small, or to prompt the app to request the updated data via HTTP or some other appropriate way.
 
knowledge is the difference between drudgery and strategic action -- tiny ad
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic