Closed shomid closed 5 years ago
My app also have problem when opening apk in android 8. But it didn't stop the app, and no error occurred. It returned 'OK' in promise. Just not opening the apk file
I solved my problem with adding code below in config.xml file:
<config-file parent="/manifest" target="AndroidManifest.xml"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
</config-file>
as per @shomid last comment, a config update is needed in your config.xml file to support opening APK files. Instructions are in the readme https://github.com/pwlin/cordova-plugin-file-opener2#android-apk-installation-limitation
Thanks @shnist.
But I have another issue. When I update my app by using file opener2 open apk file in ionic, it's not showing install success page. And I find so many people have the same issue. Like
And they all have the same solution, modify io.github.pwlin.cordova.plugins.fileopener2
and add intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
manually.
Would you please add the patch from the red lines ? https://blog.csdn.net/ducp123/article/details/80421123
in my app(ionic project) for updating app downloading apk file(new version) then when opening apk file downloaded with cordova-plugin-file-opener2(2.1.4) app stopping(android 8). this work fine in android 4.4,5,6
ionic info :