Should I use a ReadWriteLock on the functions of the contentprovider?
In the query of the contentprovider I do getReadableDatabase, then check if its open and do the query. But sometimes it crashes on DatabaseIsClosed exeption. This could be that an other process does an insert that does a getWritebleDatabase which closes the first one.
I am using an app and a service who query and insert on the contentprovider constantly. So it seems that the contentprovider isn't threadsafe.
Could it help to make the function synchronized?
Thanks!