Thank you both for your answers.
Are you sure using synchronized is enough inside the insert or update? I
also got exceptions in call to getReadableDatabase while another thread was
being writing so i don't think it would work. I am already using transaction
for DB write but it did not seem to mak
I believe you can provide the safe concurrency managment by using DB
transactions. Since you don't care about sequence between separate
activities you can run following snippet:
try
db.BeginTransaction
db.RunCommand(insert or update etc.)
db.CommitTransaction
catch
db.RollbackTransaction
Evgeny
For insert() and update(), have it under synchronized blocks.
On May 8, 5:40 pm, Thierry Legras wrote:
> Hi,
>
> I have an application with several tables, each being updated by AsyncTask
> fired by different Activities and used by UI with SimpleCursorAdapter.
> Though i am not developping a game
3 matches
Mail list logo