How can I share files with my app

I would like to create an application, with I can add a new share option to my device, whenever i want to share a file like from the file explorer. I was trying to find anything about it, but i have only found ways to open that share panel within my app, and share something with messenger or via email. But i want the opposite. I want my application to serve as the “sharing service”. (So when I open a folder in Google Files, and I press on a file, and pick share, I want my app to be in the options to share with. Like Viber, Discord, Slack and Google Drive do, since I installed it, I have the option to share a file with it. I really hope my problem is clear, and you will be able to understand it.)