Android: Closing those database objects
Android applications based on the Notepadv3 tutorial are prone to a DatabaseObjectNotClosedException when they’re closed. Here’s how to prevent them.
Android applications based on the Notepadv3 tutorial are prone to a DatabaseObjectNotClosedException when they’re closed. Here’s how to prevent them.
Using DatabaseUtils.InsertHelper, plus a couple other performance tweaks, yielded a nearly factor of ten performance improvement for bulk database insertions on AndroidOS.
On older versions of AndroidOS, there’s a bug that causes the combination of SimpleAdapter and Spinner to fail when displaying text data. There’s also a workaround: Add a ViewBinder to the SimpleAdapter. This is simpler than it sounds.
AutoCompleteTextView doesn’t require subclassing the CursorAdapter, after all. Where I’d thought it would be necessary to override certain methods, I’ve found that handler methods provided by SimpleCursorAdapter allow the same functionality without subclassing.