I'm not sure you can lock the file (at least without having root
permissions).

I am not that familiar with that in java, but I would look for a read
write lock of some kind, using the "write" lock only when you need to
transfer the file, and the "read" lock when you are writing into the
db in any of your methods.

In this way all the writes won't lock, unless you are transferring the
file, and the transfer process will wait for the end of any current
write.

Hope I was clear enough,

Federico

On 30 Nov, 10:25, manigault <[email protected]> wrote:
> Hi all, I have the following problem i have to transfer my db file
> over internet. How can i lock the file to ensure that nobody will
> write in the sqlite db file while i am transferring it. I need to get
> READ LOCK on the file to prevent blocking on read operations. Thanks

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to