How some applications track their own uninstall on android

I found that the 360 protection application after uninstalling open your page in a browser. They can do this on all versions of Android (4, 5, and 6), and I don’t understand how to do it. Maybe someone has ideas? I know about the same questions here and here and others, but they still have no answers.

This is not a mistake with the inotify framework, because it only works on the 4th android. there are no other processes that would listen to the same error in a new way, I checked. They had some kind of magic in their lib "eternity.so"

+7
java android uninstall
source share
1 answer

An application can specify a BroadcastReceiver with an action:

 "android.intent.action.PACKAGE_REMOVED" 

It will be called every time a package is deleted, even if it is its own application package. Then, in Receiver application can check which package has been removed and how to respond.

Please note that different versions of the system may relate to this differently, giving Receiver different amount of time before closing the application. Thus, the action taken should be quick and aimed at an external target, for example, send an ACTION_VIEW Intent with the URL of the web page in which you mentioned ACTION_VIEW

+1
source share

All Articles