如何禁用管理应用程序的应用程序信息中的清除数据按钮 [英] How to disable the Clear Data button in Application info of Manage application

查看:35
本文介绍了如何禁用管理应用程序的应用程序信息中的清除数据按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 android 2.2,在 android manifest 的应用程序选项卡中提供允许清除数据"选项来设置真或假.但是将其设置为 False 后,我的应用程序无法禁用管理应用程序的应用程序信息中的清除数据按钮.当应用程序在 Data/Data/packge-name/databases/中包含数据库时,我面临这个问题.

I am working on android 2.2, In a Application tab of android manifest provide the option of "Allow clear data" to set true or false. But after setting it to False, my application can't disable the button of Clear data in application info of Manage application. I am facing this problem when application contains database in Data/Data/packge-name/databases/.

我必须保护我的应用程序数据库不被用户使用.

I have to protect my application database from user.

推荐答案

没有办法阻止用户清除您的应用数据.您提到的清单选项仅适用于系统应用,您作为开发人员无法安装系统应用.

There is no way to prevent the user from clearing your app data. The manifest option you mention is intended for system apps only and you, as a developer, have no way to install system apps.

请参阅此讨论详细信息 - 特别是来自 Diane Hackborn(Android 框架工程师)的回复

Please see this discussion for details - particularly this response from Diane Hackborn (Android framework engineer)

这篇关于如何禁用管理应用程序的应用程序信息中的清除数据按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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