I agree it's not well documented what to do when opening/closing the DB from within an activity.
Instead implement a ContentProvider which opens your database and provides access to it. Your activities will then never need to worry about opening/closing the DB. On Jul 22, 3:54 pm, Doug Gordon <[email protected]> wrote: > I've seem some conflicting posts on this, so will ask it simply here. Is > it really necessary to close an SQLite database that your activity has > opened (database is in local memory or on SD card)? > > I would think it would be good practice, but I noticed that the Android > samples such as the Notepad tutorial and SearchableDictionary sample do > not do this. I've also seen sample code where the database is > consistently opened, read from, and closed, but that would seem to add > unnecessary overhead. > > Doug Gordon > GHCS Systems -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

