'Scoped Storage - How to use FileProvider to share files between my two apps (Java)

I was wondering, are there any examples in Java on how to use FileProvider to share a file from our two apps. We have an app that needs to send parameters to another one of our apps. I was told a solution was to use a FileProvider and retrieve it with a URI. However, I could not find any clear code examples in Java. Could anyone help me?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source