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 thi
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 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
.
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 know this is old but I want to provide this answer. Listening on your own uninstall is pretty easy. You just need to use a binary which you execute and runs in background(with nohup command).
This binary can either listen on PACKAGE_REMOVED broadcast or you can regulary check if the file still exists in /data/app/ (these files are world readable, directory listing is disabled, but u know your own package name :) ) I dunno if the second solution can be done without draining battery.