I'm looking for a way to sync SQLite data of my Android app across devices.
Dropbox Datastore API seems to fit just fine (at least conceptually). I've studied available examples, but cannot yet understand how does this API fit into Android data access worldview with it's ContentProvider=>ContentResolver=>Adaptor=>ListView machinery.
My guess is that certain plumbing is required for smoother integration of Datastore API, maybe even as a drop-in replacement of SQLite. And the best place where it belongs seems to be close to ContentProvider.
Is the above assumption correct, i.e.: should i try to write my custom ContentProvider that will take it's data from Datastore API? Or maybe better options exist/planned?
There isn't (yet) an existing infrastructure/library for directly connecting Dropbox Datastores to SQLite or Android Content Providers. But conceptually, I think you have the right layering in mind. A Datastore provides a similar sort of functionality to SQLite, so you can fit it into your application at the same layer. A ContentProvider built on top of a Dropbox Datastore would be a good way to abstract away the details and fit in with a lot of existing Android functionality. It should be relatively straightforward to adapt for simple queries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With