I've run into the FileUriExposedException stuff where you try to send a file:/// Uri to another app (in this case the camera), and I should be using a FileProvider instead (causes a crash on api 24 Nougat).
In our app, we generate a File using Context's
<?xml version="1.0" encoding="utf-8"?>
java.lang.IllegalArgumentException: Failed to find configured root that contains ...
Am I right in thinking I should use external-files-path if I want to match how my app currently works?
Yes. Though do note that
getExternalFilesDir() does not officially support
"attachments" as a parameter, so do not be surprised if your app breaks someday.
Is the documentation/FileProvider really broken/incorrect
Well, I see the code for
external-files-path support in the sources JAR for 24.2.0 of the new
support-v4, as of 24.2.0, has been subdivided into a series of separate artifacts, and
FileProvider lives in
So, try using 24.2.0 of
support-core-utils if you do not need all of