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
Post a Comment