Hi every, I'm writing an app which can download an apk file and open it for installation.
I'm using File Transfer Plugin and File Opener Plugin, it work well with image file.
But for the APK file, when I open it with File Opener, it returned Success but nothing happened.
In the FileOpener action I've already set the MIMEType to android package archive, but it wasn't opened.
Does anyone work with apk before, please give me some recommendation.
Here is my oml, thank you!!
Hi @Kiet Phan ,
The MIME type looks correct. On Android 8+ the app needs REQUEST_INSTALL_PACKAGES, and the device must also allow installs from that app/source.
One more thing: this File Opener implementation based on cordova-plugin-file-opener2, which is no longer maintained and known to have issues on Android 11+.
Github of the plugin: cordova-plugin-file-opener2 .
Thanks for recommending,
I tried to use AndroidPermissionsPlugin,
CheckAndroidPermissionsPlugin still return true, but when I call the requestPermission for INSTALL_PACKAGE, still nothing happened.