java - how to change getWritableDatabase() pointing path? -
i have code:
// 2. reference writable db sqlitedatabase db = this.getwritabledatabase(); cursor cursor = db.rawquery(query, null);
and see db is
sqlitedatabase: /data/data/com.myapp/databases/user.db
however part of app writes here:
adb pull data/data/com.myapp/user.db
( verified pulling adb pull
)
how can change path of sqlitedatabase: /data/data/com.myapp/databases/user.db
) ?
/data/data/com.myapp/databases/user.db
correct location databases. consider fixing part of code expects data/data/com.myapp/user.db
.
to change path, can supply full path sqlitedatabasehelper
constructor instead of database name user.db
.
Comments
Post a Comment