问题描述
我是新来的Android开发和正在创建的Android中的一个TodoList的应用程序。
I am new to Android development and am creating a "ToDoList" app in Android.
我用SQLlite数据库保存在一个数据库表中的清单,并
它完美地保存的数据。
I used a SQLlite database to save the list in a database table, andit saved data perfectly.
我没有Android手机,所以我可以检查我的应用程序
只有使用模拟器。
I don't have an Android phone, so I can check my applicationonly using an emulator.
保存在数据库中的任务,如果用户重新启动手机,然后将在数据库中我的任务列表中删除与否之后?如果将随后被删除,如何可以在表中的数据持久化?
After saving tasks in the database, if a user restarts the phone then will my task list in database be deleted or not? If it will be deleted then how can I make the data in the table persistent?
推荐答案
表绝对保持如果用户只需重新启动手机。关闭我的头顶,我认为只有这样,才能摆脱完全的表是要么:
The table definitely stays if the user simply reboots the phone. Off the top of my head, I think the only way to get rid of the table completely is to either:
- 删除它(以编程方式或通过SQL命令行)
- 卸载应用程序
只需将您的应用程序升级到新版本将不会删除现有的表(只要你制作APK时使用相同的密钥库)。
Simply upgrading your application to a new version will not delete your existing tables (so long as you use the same keystore when making the APK.)
- 丹
这篇关于我怎样才能让Android应用程序的数据持久化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!