Duplicate a DB file[Android]
<p>I'm working with an application that has to download a huge amount of data and insert them to database . I had it to work on a thread . But the problem is , when the thread is doing inserts , a db lock error occurs while my application reads from db . So I'm thinking about a way to avoid this : Copy the existing db file , let a thread to do inserts to this duplicate while my application reads from the original one until the inserts are completed . Then delete the original one and rename the duplicate to the original . My question is , is my way feasible ?</p>
