I need to send bulk of data to my database on server from Android app, and need to sync it periodically. I went through Sync Adapters sample code on Android Developer's website, but couldn't get the concept and usage.
I need help regarding:
how it can be used for server database interaction?
can a single Sync adapter be used to synchronize data in multiple tables, at once?
I start working few days ago on SyncAdapter
, SyncService
, I can answer to your second question by YES you can sync multiple tables through a ContentProvider
implementation.
Your first question has a large scope that I think it will take time to cover. In your onPermformSync
, you could make HTTP request (PUT / GET etc.) to your server to synchronize local and server information.
I hope my light knowledge on the subject will be helpful !