I'm using FileProvider in my app, when I take a picture from the app is stored there. also my app have a different application id for debug and release builds
- com.rkmax.myapp
- com.rkmax.myapp.debug
I have defined my file provider like this
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="@string/authority_file_provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
the value of @string/authority_file_provider
will turn into:
- com.rkmax.myapp.fileprovider
- com.rkmax.myapp.debug.fileprovider
and my @xml/file_paths
is defined like
<?xml version="1.0" encoding="utf-8"?>
<paths>
<external-path name="my_images" path="Android/data/com.rkmax.myapp/files/Pictures" />
</paths>
if I try to changes to something like Pictures
or files/Pictures
my app fails
Failed to find configured root that contains/storage/emulated/0/Android/data/com.rkmax.myapp.debug/files/Pictures/20161112_073128-251269360.jpg
How I define a relative path in the file provider paths?