How to detect the situation when a user cancels an application (.apk file) installation?
My app programmatically installs other apps, but users can cancel installation process. During the installation a user sees a dialog like that: "Replace application. The application you are installing will replace another application". And then a dialog "Do you want to install this application?". If the user presses "Install" the ACTION_PACKAGE_...
broadcast is generated. But how to detect if the user presses "Cancel"?
I think that you can't detect if the user uninstall or not install an app but you can check that the other apps required are installed when you start your app or after to do an action
If a user chooses "Install"
Intent.ACTION_PACKAGE...
actions will be generated.If a user chooses "Don't install" an activity quits without
Intent.ACTION_PACKAGE...
actions.That means "User has canceled an installation".