android - SQLiteDatabase.openDatabase(...) vs getWritableDatabase -


i bundled database app in assets folder. @ first activity, copy database correct location (no problem here).

my question; better use opendatabase (string path, sqlitedatabase.cursorfactory factory, int flags) or use getwritabledatabase method of sqliteopenhelper class?

which more efficient? i'm accustomed using getwritabledatabase method, requires passing of context, feel can without since don't need onupgrade or oncreate function of sqliteopenhelper.

getwritabledatabase sqliteopenhelper's way of opening databases.

if not need sqliteopenhelper, not need call getwritabledatabase either.


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -