Possible Duplicate:
When should I do certain SQLite operations on another thread(not the main thread)?
I am wondering, should all SQLite database operations in my android app be done in a thread, or can small ones, such as adding a single row, be used on the UI thread?
Its purely a matter of choice .
While some stubbornly say that all DB operation must be in thread while others might not feel the same.
So it depends on the developer and how he wants the UI to be.
In my opinion creating thread for a simple write operation is actually an overhead and would be more convenient to be on UI thread.
But beware of such usage an exception can cause your UI thread to be exceptioned.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With