I have to write some application that will possess a couple threads which threads is going to be use local database. I afraid these threads is going to be compete among themselves for database. Can there be any simple means to fix solve this issue? I just read will be able to use content provider becouse then is going to be just one reference to database but maybe there's another solution? Thank you for all advice and tip.
Play one DataBase Assistant class and make up a single instance which may be utilized by both threads.
Make all of the techniques in DataBase Assistant class as synchronized to prevent race conditions.