Is it OK to have one instance of SQLiteOpenHelper shared by all Activities in an Android application?

Click here to see my blog post on this subject. CommonsWare is right on (as usual). Expanding on his post, here is some sample code that illustrates three possible approaches. These will allow access to the database throughout the application. Approach #1: subclassing `Application` If you know your application won’t be very complicated (i.e. if … Read more

android java.lang.IllegalStateException: Couldn’t read row 0, col 0 from CursorWindow

01-29 13:41:56.520: W/CursorWindow(4121): Window is full: requested allocation 5140987 bytes, free space 2096617 bytes, window size 2097152 bytes Android SQLite returns rows in cursor windows that have the maximum size of 2MB as specified by config_cursorWindowSize. If your row exceeds this limit, you’ll get this error. Storing large data in sqlite database is not a … Read more