I currently require a ContentProvider
built on top of a SQLite
database for my SyncService
/SyncAdapter
that runs in a separate process from my application. The SyncService
does some small queries and updates to some data. I figured I could use the ContentProvider
(accessed through getContentResolver()
) to access/update data throughout my main application as well, instead of directly querying the SQL
database the provider is built on top of.
Recently though, I have been plagued with TransactionTooLargeExceptions
in my SyncAdapter
(:sync process)
- even though it is only making small queries/updates the the database. However, I make much larger queries with the ContentProvider
in my application (Main process). Could this be the reasoning behind the buffer getting too large in the SyncAdapter
? Do both processes share the same ContentProvider
, and therefore the same Transaction buffer?
If this is the case, it would be wise to NOT use the ContentProvider
in the main application process, correct? If that isn't the case - what are the pros/cons of using a ContentProvider
inside the main app at all?