android - Can the sqlite db be included in the apk file itself? - Stack Overflow

I made a CURD App using splite3 with Tauri Ver2.It's working fine, but I have a question.At the

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条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信