質問

I don't understand why database files are stored in the android emulator or phone in the data folder data/data//databases rather than being stored in the application that uses it.

Logically, the database file must also be stored in the android app, right ?

If yes, where should it be stored in the app directory ?

役に立ちましたか?

解決 2

Put your database in your assets folder, then its path is given by "/data/data/<your-package-name>/databases/<dbname>"

他のヒント

your database will be saved under data/data/myApp/database and not in any other folder but your application folder, since database consider as a private to your app, android make it hard for people with non-root access to see your database. you still can store it in any place you like just point to it from your app.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top