lundi 23 mars 2015

Android SQLite: Should I use beginTransactionNonExclusive() instead of beginTransaction() for ALL transactions if my app is only for API >= 11?

When doing a transaction in Android, there are beginTransaction() and beginTransactionNonExclusive() methods starting from API 11.


For me it's not very clear from the documentation whether if my application is targetting only API 11 devices and above, I should use beginTransactionNonExclusive() for all transactions I have in my application. Is there any downsides?


It is also mentioned that, if I understand it correctly, for beginTransactionNonExclusive() to work correctly, the database must have Write-Ahead Logging enabled.


I tried to look for some articles about this, but I can't find anything from Google regarding this, and I found this article that looks great but it is in Japanese.


Any help in guiding when and how beginTransactionNonExclusive() should be used would be very much appreciated.


Aucun commentaire:

Enregistrer un commentaire