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

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -