SQLite数据库中删除时,从应用程序清楚我的数据 [英] Sqlite Database deleted when I clear data from Application

查看:265
本文介绍了SQLite数据库中删除时,从应用程序清楚我的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在应用中创建 sqlite的数据库。当从设置 - &GT我清楚的数据;应用 - >管理应用 sqlite的分贝删除。任何建议保持 sqlite的数据库,因为它是。

I have created Sqlite database in app. when I clear data from settings->applications->manage applications the Sqlite db removed. any suggestions to keep sqlite database as it is.

推荐答案

在preSS 清除数据从Android应用程序管理器它应该删除有关的一切这被留给应用程序,如preferences,数据库,高速缓存等的仅仅是应用程序,所以当你重新启动它的行为就好像它是刚刚安装。

When you press Clear Data from the Android application manager its supposed to remove everything related to the app such as preferences, databases, caches etc the only thing that gets left is the app so when you re-launch it behaves as if it was just installed.

如果你想允许用户清除数据,但保留数据库那么就应该在删除共享preferences,但并没有对数据库的任何菜单选项。

If you want to allow the user to clear the data but keep the database then there should be an option in the menu that removes the shared preferences but doesn't do anything with the database.

希望这有助于。

这篇关于SQLite数据库中删除时,从应用程序清楚我的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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