-
Notifications
You must be signed in to change notification settings - Fork 130
Fixed FileUriExposed
error on Nougat properly
#118
Conversation
For convenience with new FileProvider URIs
this approach is not working. before returning to the |
@hrsalehi do you have any code to demonstrate a case where it doesn't work? Are you sure you are using the |
here is the stack trace :
I wrote a file provider section in the manifest, but in android 7.0 nothing works. |
I just tested the 4.0.0-beta1 version and the problem is solved. Thanks |
@hrsalehi yes, you need to add a provider to your manifest, as is described in the PR description above. And then the result handling code will have to change little, which is also described above. If anything is unclear, please let me know and I'll make sure to update the documentation better before the real release |
fixes #107
fixes #115
changelog: You are now required to define a
FileProvider
in your manifest for the SD-card pickerDue to recent changes in Android 7.0 Nougat, bare File URIs can no longer be returned in a safe way. This change requires you to add an entry to your manifest to use the included
FilePickerFragment
and change how you handle the results.AndroidManifest.xml
:This change was required in order to fix
FileUriExposedException
being thrown on Android 7.0 Nougat, as reported in #115 and #107.Please see the updated activity in the sample app for more examples.