samedi 28 février 2015

Android - Database sync, Client and Server, SyncAdapter? ContentProvider?

I have an android client and a arbitrary webb server. The client has a local SQLite database. The server has a MySQL database.


I want to synchronize the client database so that it is always up-to-date with the server database.


My concerns is on how i should do the synchronization on the client side. My current approach is using a syncAdapter and then I'm trying to somehow hook up a contentProvider to change the data in the SQLite database. From my reading on the android developer site i interpreter this is how you should do it. (As new to android development I feel the contentProvider is hard to understand)



  • Is this the best approach or is there some better/easier way to do it?

  • Can I use the sync adapter but exclude using the content Provider? If so how could I make such an approach?




I have set up the sync adapter accordingly to this developer guide: http://ift.tt/1iPZgZz


I guess I have to set up the ContentProvider accordingly: http://ift.tt/1eNYhY6


Aucun commentaire:

Enregistrer un commentaire