문제

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