OrmLite should db operations be performed in the main thread?

Android docs mention here that when you call getWritableDatabase() or getReadableDatabase() you should always do this in the background thread.

I use OrmLite for my application, and when I call getHelper() , I call it from the user interface / main thread.

I also have StrictMode for my application, and I don't remember the warning in logcat.

What is the preferred way to use this? What about any SQL operations like insert or update in my Dao objects? Should they occur in the background thread?

+4
source share

All Articles