Remember that Play policies still apply to apps distributed on Google Play if those apps can install and update other apps. In the majority of cases, such behavior is inappropriate; you should instead provide a deep link to the app's listing on the Play Store.
If an app uses a targetSdkLevel of 26 or above and prompts the user to install other apps, the manifest file needs to include the
Apps that haven't declared this permission cannot install other apps, a handy security protection for apps that have no intention of doing so.
In order to correctly access the APK file you will also need to add the following file provider to the manifest inside the
You will need to replace
APPLICATION_PACKAGE with your applications package name, generally your AIR application id prepended with
You can check whether the current device can install applications by checking the
You can redirect the user to the appropriate settings by calling
This will redirect the user to the application settings screen similar to the following:
On older versions of Android it will redirect to the generic unknown sources settings screen.
To install an application use the
installApplication() method and pass the native path to an APK file: