How to access an existing sqlite database in Android?

后端 未结 4 1735
长发绾君心
长发绾君心 2020-11-30 23:58

So far we have developed apps in android that create database on runtime. We like to know how can we access a pre-built or existing database/sqlite file in our android app?

4条回答
  •  青春惊慌失措
    2020-12-01 00:06

    First copy your SDCARD and give it's path in the variable "DBNAME" in the following example. it will be something like "/sdcard/persons.db" if you are directly pulling it to sdcard.

提交回复
热议问题