如何在卸载我的应用程序之前显示活动 (Android) [英] How to show an Activity BEFORE my app is uninstalled (Android)

查看:16
本文介绍了如何在卸载我的应用程序之前显示活动 (Android)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我虽然这是不可能的,但我注意到 NQ Mobile Security 能够在我单击卸载"后和调用 PackageUninstaller 之前显示一条消息.我想在我的应用中复制这种行为.

I though it was not possible but I noticed that NQ Mobile Security is able to show a message after I click on Uninstall and before the PackageUninstaller is called. I would like to replicate this behavior in my App.

我尝试使用 Activity 侦听android.intent.action.DELETE"意图,如下所示:如何知道我的应用已从设备上卸载...?

I tried with an Activity listening to "android.intent.action.DELETE" Intent, as suggested here: How to know my app is uninstalled from the device...?

但是当我要卸载我的应用程序时,选择器会弹出,要求选择我的应用程序或包卸载程序.我怎样才能避免这种情况?

But as I'm about to uninstall my app, the chooser pops up asking to pick my application or the package uninstaller. How can I avoid this?

是否有其他方法可以拦截您的应用程序 UNINSTALL 事件?(在回答这是不可能的之前,请尝试卸载 NQ Mobile Security,看看会发生什么.在我的 Android 2.3.4 上,它显示了一个很好的屏幕,说没有安全应用程序是不安全的).

Is there a different way to intercept your application UNINSTALL event? (before answering that it is not possible, please try to uninstall NQ Mobile Security and see what happens. On my Android 2.3.4 it shows a nice screen saying that is not safe to go without a security app).

推荐答案

我注意到 NQ Mobile Security 能够在我点击卸载后和 PackageUninstaller 被调用之前显示一条消息

I noticed that NQ Mobile Security is able to show a message after I click on Uninstall and before the PackageUninstaller is called

他们一定是在利用 Android 中的某些安全漏洞.我会研究它,看看我是否可以修复它.应用不应在卸载时获得控制权.

They must be exploiting some security flaw in Android. I will research it and see if I can get it fixed. Apps are not supposed to get control at uninstall time.

感谢您指出这一点!

是否有其他方法可以拦截您的应用程序 UNINSTALL 事件?

Is there a different way to intercept your application UNINSTALL event?

我当然希望不会.

这篇关于如何在卸载我的应用程序之前显示活动 (Android)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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