Android预填充数据库 [英] Android prefilled DB
本文介绍了Android预填充数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以向我的应用程序提供预填充的SQLite DB?我想将db用作普通的SQLite db,它将手动填充表,并且希望将其包含到我的.apk文件中.
Is it possible to supply prefilled SQLite DB to my app? I want to use db as ordinary SQLite db which will have tables filled manually and I want to include it into my .apk file.
推荐答案
是的,将其包含在资产文件夹中,并在应用程序首次启动时将其复制到/databases文件夹中.
Yes, include it in your assets folder and copy it into the /databases folder when your application first launches.
这篇关于Android预填充数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文