Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show an Activity BEFORE my app is uninstalled (Android) [duplicate]

Tags:

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.

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?

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).

like image 391
robsf Avatar asked Apr 18 '12 23:04

robsf


People also ask

How do I find uninstalled app history on Android?

Open the Google Play app on your Android phone or tablet, and tap on the menu button (the three lines that show up in the upper left corner). When the menu is revealed, tap on "My apps & games." Next, tap on the "All" button, and that's it: you'll be able to check all your apps & games, both uninstalled, and installed.

How do I stop accidentally deleting apps on Android?

Use AppLock If you want to block users from uninstalling specific apps, scroll down to General. Then, simply lock the respective app(s). Once the app locked, users won't be able to launch it or uninstall it.

Can an uninstalled app be reinstalled?

You can either search for the app in the search bar, or if you if forgot the name, tap “Updates” and then tap “Purchased”. Scroll through the list to find the app you want to reinstall and then tap on the little cloud icon to the right of it. Your app will then begin to reinstall onto your device.


1 Answers

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

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.

Thanks for pointing this out!

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

I sure hope not.

like image 90
CommonsWare Avatar answered Oct 21 '22 10:10

CommonsWare