I implemented Content Provider that uses a SQLiteDatabase as its backing data source.
One activity (code) writing to the DB by calling getContentResolver().applyBatch(operations), which should be atomic.
Second activity (code) reading from the DB with the help of Cursor Loader, and sometimes gets old data (race condition).
Some resources (sorry, caot add more then two links):
_http://developer.android.com/guide/topics/providers/content-provider-basics.html#Batch
_http://www.androiddesignpattes.com/2012/10/sqlite-contentprovider-thread-safety.html
_http://stackoverflow.com/questions/8104832/sqlite-simultaneous-reading-and-writing
Do you have any ideas what's wrong?
