安卓pre填充的数据库数据库、pre

由网友(繁华落幕£)分享简介:我的工作填充的应用程序的数据库中,然后用户可以使用该应用的Andr​​oid应用程序将需要几个条目(一个表,以1000-10000行)。我看了看周围的一些教程,我不确定要做到这一点的最好办法。如果我只是检查是否存在数据库应用程序每次启动时,如果它不存在,创建并插入几千条记录,我需要?还是有更好的方法来处理这​​个问题?...

我的工作填充的应用程序的数据库中,然后用户可以使用该应用的Andr​​oid应用程序将需要几个条目(一个表,以1000-10000行)。我看了看周围的一些教程,我不确定要做到这一点的最好办法。如果我只是检查是否存在数据库应用程序每次启动时,如果它不存在,创建并插入几千条记录,我需要?还是有更好的方法来处理这​​个问题?理想情况下,它可以被包括在应用程序的安装过程的一部分,但我不知道这是可能的。任何反馈会大大AP preciated。

I am working on an Android application that will need several entries (a single table, with 1000-10000 rows) populated in that app's database before the user can use that app. I've looked around some tutorials and I am unsure of the best way to do this. Should I just check if the database exists each time the app is started and, if it isn't there, create it and insert the thousands of records I need? Or is there a better way to handle this problem? Ideally, it could be included as part of the app's install process, but I'm not sure if this is possible. Any feedback would be greatly appreciated.

推荐答案

该环节都有很好的答案http://stackoverflow.com/questions/513084/how-to-ship-an-android-application-with-a-database

阅读全文

相关推荐

最新文章