Closed mkamayd closed 5 years ago
Resolved with last version I think
Still crashing :/
The problem is in plugin.xml.
The provider's authorities is set to com.vaenow.appupdate.android.provider.${applicationId}
, but the code in DownloadHandler.java is calling with "com.vaenow.appupdate.android.provider"
- i.e no application id.
I've created a pull request to fix the issue; https://github.com/vaenow/cordova-plugin-app-update/pull/66
I also reproduced this issue on Samsuang Galaxy Tab A with Android 7.0 Even if, I update to v1.4.10. This issue still not been solved. Below is the Android log:
E/AndroidRuntime: FATAL EXCEPTION: JavaBridge
Process: packageName, PID: 20227
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.INSTALL_PACKAGE dat=content://com.vaenow.appupdate.android.provider/download/v2.0 flg=0x1 launchParam=MultiScreenLaunchParams { mDisplayId=0 mBaseDisplayId=0 mFlags=0 } }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1844)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1531)
at android.app.Activity.startActivityForResult(Activity.java:4403)
at org.apache.cordova.CordovaActivity.startActivityForResult(CordovaActivity.java:342)
at android.app.Activity.startActivityForResult(Activity.java:4362)
at android.app.Activity.startActivity(Activity.java:4686)
at android.app.Activity.startActivity(Activity.java:4654)
at com.vaenow.appupdate.android.DownloadHandler.installApk(DownloadHandler.java:106)
at com.vaenow.appupdate.android.DownloadHandler.handleMessage(DownloadHandler.java:57)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
In Android Emulater(android 7.0) I update to v1.4.12 when i updated app but error: E/AndroidRuntime: FATAL EXCEPTION: JavaBridge Process: com.company.crownapp, PID: 5896 android.os.FileUriExposedException: file:///storage/emulated/0/download/crownapp28 exposed beyond app through Intent.getData() at android.os.StrictMode.onFileUriExposed(StrictMode.java:1799) at android.net.Uri.checkFileUriExposed(Uri.java:2346) at android.content.Intent.prepareToLeaveProcess(Intent.java:8933) at android.content.Intent.prepareToLeaveProcess(Intent.java:8894) at android.app.Instrumentation.execStartActivity(Instrumentation.java:1517) at android.app.Activity.startActivityForResult(Activity.java:4224) at org.apache.cordova.CordovaActivity.startActivityForResult(CordovaActivity.java:342) at android.app.Activity.startActivityForResult(Activity.java:4183) at android.app.Activity.startActivity(Activity.java:4507) at android.app.Activity.startActivity(Activity.java:4475) at com.vaenow.appupdate.android.DownloadHandler.installApk(DownloadHandler.java:94) at com.vaenow.appupdate.android.DownloadHandler.handleMessage(DownloadHandler.java:54) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.os.HandlerThread.run(HandlerThread.java:61)
and in AndroidManifest.xml
<provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="android.support.v4.content.FileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/provider_paths" />
</provider>
<provider android:authorities="${applicationId}.opener.provider" android:exported="false" android:grantUriPermissions="true" android:name="io.github.pwlin.cordova.plugins.fileopener2.FileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/opener_paths" />
</provider>
@vaenow hi ,can you help me check what's wrong?
Still crashing :/
Still crashing :/
Maybe you need check proguard if you use it. Add lines like below may get things work,
-keep class xxxx.xxxx.BuildConfig { *; }
This plugin is awesome and does work fine in many android devices. I am having issues only with multiples Galxy S7 devices running android 7.0 The pop up is launched but after downloading the apk the app crashed and does not perform the install. These keep happening every time you open the app. I am allowing unknown sources and un-checking the flag that in these device ask if you want to install only once the apk. Thanks for the help.