Android external database in assets folder

后端 未结 5 1658
故里飘歌
故里飘歌 2020-12-31 23:21

I have an android application that is supposed to read and expand a database that is already created on sqlite...it works fine on emulator by putting database in \"data/data

5条回答
  •  悲&欢浪女
    2020-12-31 23:39

    You cannot directly open files from assets folder. Instead, you need to copy the contents of your assets folder on an internal/external storage and later use the File path to open the file. In emulators, its easier for you to access the data folder of your apps. However, on a real non-rooted android device, its not possible due to security reasons.

提交回复
热议问题