Compiling for Android N I\'ve faced an issue of FileProvider
. I need to let user to pick image from gallery/take picture with camera then crop it to square.
I think this question is based on a misunderstanding.
The purpose of a FileProvider is to grant access (to an external app), to a file that your app already controls.
You will never succeed in using your own file provider to gain access to a file owned by an external app.
It is up to the external app to grant you that access using a file provider, if it chooses to.
That seems to be what the question is asking for. If I have not understood your question, let me know, but if I do understand it, what you are trying to do just won't work.