Nach stackoverflow:
You can get the broadcast for any other package getting uninstalled
but never for your own package.
Reason
That happens because when you register uninstall receiver 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.
Just think of a scenario that say a broadcast is registered(say a sms
receiver) and the app is about to get uninstalled.Now sms comes in
broadcast detects it but the broadcast's application(which created it)
got uninstalled.The may lead to inconsistency in the system.So may be
thats the reason it happens.
und als 2. Quelle: http://stackoverflow.com/questions/18692571/how-it-works-warning-that-app-is-going-to-be-uninstalled
Sieht so aus als ob es nicht gehen würde. Warum geht es dann trotzdem bei manchen Apps??
PS: Wenn man das machen könnte dann gäbe es ja den Ultimativen Trick, das in seine App einzubauen und so kann sie nie wieder deininstaliiert werden... Das kann/darf nicht so sein.
LG Pascal
LG Pascal //It's not a bug, it's a feature.
Empfohlener redaktioneller Inhalt
Mit Deiner Zustimmung wird hier ein externer Inhalt geladen.
Mit Klick auf den oben stehenden Button erklärst Du Dich damit einverstanden, dass Dir externe Inhalte angezeigt werden dürfen. Dabei können personenbezogene Daten an Drittanbieter übermittelt werden. Mehr Infos dazu findest Du in unserer Datenschutzerklärung.