Why the same question again
This question has been asked around 100 times on SO. I am asking it again because all the answers say this is not possible
but at least one of the app in Market is doing it NQ Mobile Security
. I started a bounty of 100 points on the similar question but it did not get enough attention. If community does not accept I will remove the question.
What is the App doing
The app shows an activity when user tries to uninstall it
and does some processing before it is uninstalled
What is my Question
How to start an Activity
or an IntentService
before an application in uninstalled by the user who has earlier installed the app on her device?
As @CommonsWare said The techniques used by NQ Mobile Security have been reported to the Android Security group, and they are working on a fix to stop this behavior from occurring.
and have raised a feature request with Google hopefully they may listen to it.
http://code.google.com/p/android/issues/detail?can=2&q=33315&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&id=33315
I think that you can track logcat, where all activities, events, intents are registered and and find when an Intent is sent to uninstall this app.
Then you could possibly perform an action, i.e. launch an Activity, but I am not sure for this step.
Hope this helps!
I don't know how it happen in NQ Mobile Security application
,
But in general case I found it not possible (Or may be possible but I couldn't find the way),
Because,
When you register BroadcastReceiver
for android.intent.action.PACKAGE_REMOVED
in your own app and when the app is uninstalled, the registered BroadcastReceiver
has been uninstalled before the app gets uninstalled,so its own uninstallation event won't be received by that BroadcastReceiver
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With