我们所知道的通常(在实践中任何)卸载前防病毒应用程序用于触发简单的对话框,如: “你要卸载应用程序,你确定吗?”“是/否”。
是的,我知道我可以拦截包删除意图使用意图过滤器,如:
<activity
android:name=".UninstallIntentActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.DELETE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="package" />
</intent-filter>
</activity>
但问题是,这在简单的事实,这拦截 任何删除请求,此外,这将激发我的应用程序和股票安装程序之间的选择对话。因此,如果用户将选择股票安装程序-我将无法做任何事情。
我的目标不是阻止用户卸载我的应用程序,而只是回滚我的应用程序所做的更改。
从这些反病毒应用程序的学习,我看到这种操作是可能的,所以请帮助我,并解释它是如何可能的?
更新
因为有些人不相信这是真的——我会参考 停止移动安全:
反盗窃保护自己从卸载伪装其组件 用各种自我保存技术。
另一个例子是 Android-abc0的卡巴斯基安全部队,它需要输入密码。
无论如何,这意味着有办法拦截卸载过程,以防止卸载或做一些终结工作。