0
votes

I want to create my own SyncAdapter, that syncs information from my app with some server. The thing is - I want the sync itself to run from my own application's context, using my own connection to the DB, w/o the need to access my DB using a ContentProvider.

Is that possible?

Thank you,

Udi

1

1 Answers

4
votes

Short answer: No, it's not possible.

Long answer: The Android platform's model for sync is to link a user Account to a ContentProvider through a SyncAdapter. You can't set up the XML tags in AndroidManifest to be read by the Android platform without having set up all three.

Biased answer: You should never write an app with a local DB. ContentProvider is by far the way to go, for the reasons listed here.