Hi Guys, Is keeping a writable instance of a database open (SQLiteOpenHelper.getWritableDatabase()) during the running application a bad practice? Because every once in a while and with every activity screen some database operations are done as well (both read/write), I open the database at startup of my application (Application.onCreate()) and close it on shutdown (Application.onTerminate()).
Just in case it matters, I have background service as well (getting started on BOOT_COMPLETED) which uses the same database via a separate call to SQLiteOpenHelper.getWritableDatabase(). Of course here I open the database whenever service onStart() is called and close it at end of the call. Best Regards, Armond --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---