I made a CURD App using splite3 with Tauri Ver2. It's working fine, but I have a question.
At the moment, I'm copying the sqlite database app.db to Android manually using the adb command, and displaying the data. Is there a way to eliminate this manual copying?
Also, after building the app, I'm copying this db manually using the adb command, and I'm able to display the data on my Android phone , but is it possible to include the sqlite data in the apk file itself when building it, and make it a single apk file?
this is current my code
useDatabase.ts
const database = await Database.load("sqlite:assets/app.db");
tauri.conf.json and tauri.android.conf.json
"sql": {
"all": true,
"sqlite": {
"path": "app.db",
"permissions": ["read", "write", "create"]
}
},
"resources": ["assets/*"],
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744986364a4604634.html
评论列表(0条)