如何禁用管理appliaction的应用信息的清除数据按钮按钮、数据、信息、appliaction

2023-09-12 21:41:18 作者:老子最可爱

我的工作在Android 2.2,Android中的应用程序选项卡文件中体现提供了允许清除数据选项,设置true或false。但是,将其设置为False后,我的应用程序不能禁用管理应用的应用信息的清除数据的按钮。我面临这个问题,当应用程序包含数据库中的数据/数据​​/装箱率名/数据库/。

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/.

我已经度过我的2天这个问题,但结果是零,。 我要保护我的应用程序数据库与用户。请帮我。

I already spend my 2 days for this issue, but result is zero,. I have to protect my application database from user. Please help me.

推荐答案

有没有办法为prevent从清除您的应用程序数据的用户。你提到的清单选项仅用于系统的应用程序,你,作为一个开发者,都没有办法安装系统的应用程序。

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.

请参阅这个讨论了解详细信息 - 特别是这的黛安Hackborn(Android框架工程师)的响应。

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