android - replace database file from assets by the database from data folder -
i have database file "mydb.db" (it have 1 table), , put file assets folder, app copy data it, can read data there no problem, when try add new row in table new row existing in data folder mean if clear data or reinstall app lose new row. how add row file in assets folder "mydb.db"? or how replace new database data/data folder old file "mydb.db" in assets folder? i use code
sorry bad english.
you cannot in app. assets read-only.
you can modify database on computer , replace source version of asset gets bundled in apk.
for versioning preinstalled databases , without problems code you're using, consider sqlite-asset-helper.
Comments
Post a Comment