安卓pre填充的数据库 [英] Android Pre-Populated Database

查看:168
本文介绍了安卓pre填充的数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作填充的应用程序的数据库中,然后用户可以使用该应用的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.

推荐答案

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

这篇关于安卓pre填充的数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆