I am trying to install other applications from my application. I downloaded .apk from the server and I fire the intent with the following content
Intent installIntent = new Intent(Intent.ACTION_INSTALL_PACKAGE); installIntent.setData(Uri.parse("file:<apk file location>")); installIntent.putExtra(Intent.EXTRA_INSTALLER_PACKAGE_NAME, DOWNLOADED_PACKAGE_NAME); installIntent.putExtra(Intent.EXTRA_NOT_UNKNOWN_SOURCE, true); installIntent.putExtra(Intent.EXTRA_RETURN_RESULT, true); startActivityForResult(installIntent, REQUEST_INSTALL);
- But I am trying to install the default installer while trying to install the package.
- The following prompt appears after I started the installation intent, ask the user to select the default application to handle the intent, which is undesirable.
- This prompt should not be displayed to the user.
- The desired behavior is to start installing the package after the download is completed, for example, on Google Play.
- Click "Install" → Download → Set permission → Install.
How to avoid this invitation?
This feature is added with 4.2 ONLY.

source share