In my app I\'ve got to implement some UI and Sync service. It runs in the background and updates data. Sync service is not very simple, it uses multithreading.
So, here
So, finally came out to the solution. Here it is.
I read some forums, google groups and found out that sqlite database should be opened only once. So, I implemented this using singleton.
Also, I implemented some db code to synchronize all write operations (to prevent many threads execute write operations at one time). And I don't care about opening cursors, reading from them.
After some days testing I've got no error reports from my users, so I think this works
In my previous work I opened sqlite database many times across the application, that was the problem.