react-native-fetch-blob
react-native-fetch-blob copied to clipboard
Bug Fix Branch 0.11.0 - Solve Android security exposed app error
This PR is addressed to #358 . It solves the exposed security exception on Android devices with API version >= 24. In older API's the code hasn't changed, still uses file://...
.
Great work, @Moreno97 👍 Hope to see this merged soon and 0.11.0
released.
I am getting the following error quite often, though. Don't know if I'm missing something?
* What went wrong:
Execution failed for task ':app:installRelease'.
> com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Failed to finalize session : INSTALL_FAILED_CONFLICTING_PROVIDER: Package couldn't be installed in /data/app/com.jacoblauritzen.myapp-2: Can't install because provider name com.RNFetchBlob.provider (in package com.jacoblauritzen.myapp) is already used by com.jacoblauritzen.myapp.debug
Hi @Jacse , maybe you have installed another app that is using the same provider. A quick fix is changing the provider on manifest of react-native-fetch-blob
to get the provider of the package name (also remember to change the reference on the code). I will work on it. Thanks!
After some investigation I resolve the error. It's necessary to change the references on the library and add a provider in your app manifest like this:
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
</provider>
As soon as I can I'll update the PR.
Great! Yes, my release
and debug
versions are two different apps so I can tell the difference 😄
FYI
react-native-fetch-blob has a new maintained location. Check out the README.
Please consider submitting your PR there, this repository is unmaintained.
@lll000111 Ok! As soon as we can we'll submit the PR there. Thanks!
Are you guys going to merge it?
@pavermakov Of course not! Read the README.