1. You must also declare this FileProvider in the manifest
2. At this time, you have to use other URIschemes instead of file://, such as the content:// of MediaStore. Directly upload the code:
3. Another way is to share files, which is to share files with a little more complicated operation. The rough code is as follows (the code function is to take photos):
4. The examples in this article share the specific code for Android to realize the sharing of pictures to the circle of friends for your reference. The specific content is as follows
5. The above is the entire content of this article. I hope it will be helpful to everyone's study and I hope everyone will support me more.
6. Reference: *
7. Create a new file file_paths.xml in the res/xml/ folder: