9
Views
2
Comments
[File Opener] File Opener doesn't work with APK file
Question
file-opener
Mobile icon
Forge asset by Mangini

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!!

TestFileDownload.oml
2026-01-28 16-57-48
Mihai Melencu
Champion

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 .

2025-12-04 09-01-03
Kiet Phan
Champion

Thanks for recommending, 

I tried to use AndroidPermissionsPlugin,

CheckAndroidPermissionsPlugin still return true, but when I call the requestPermission for INSTALL_PACKAGE, still nothing happened.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.