If your application requires a database and it comes with built in data, what is the best way to ship that application?
(如果您的应用程序需要一个数据库,并且它带有内置数据,那么最好的运输方法是什么?)
Should I: (我是不是该:)
Precreate the SQLite database and include it in the .apk
?
(预先创建SQLite数据库并将其包含在.apk
?)
Include the SQL commands with the application and have it create the database and insert the data on first use?
(在应用程序中包括SQL命令,并让它创建数据库并在首次使用时插入数据吗?)
The drawbacks I see are:
(我看到的缺点是:)
Possible SQLite version mismatches might cause problems and I currently don't know where the database should go and how to access it.
(可能的SQLite版本不匹配可能会导致问题,并且我目前不知道数据库应该去哪里以及如何访问它。)
It may take a really long time to create and populate the database on the device.
(在设备上创建和填充数据库可能会花费很长时间。)
Any suggestions?
(有什么建议么?)
Pointers to the documentation regarding any issues would be greatly appreciated. (有关任何问题的文档指针将不胜感激。)
ask by Heikki Toivonen translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…