Share data between apps

I have a question,
I am developing an android app
In which I need to have a function of sharing data to and from, both ways.

I need to know
How to share from my all to other and my app with my app, but with different, user

In WhatsApp you select some post then select share , it makes available, the apps which can receive share, then U select that app, then the user, after that data is shared with that user.

I need to How to register for input send

I if there is some text , is made available, for other apps to send. Like in WhatsApp I have selected a post and want to share , to other, when ever I select share, multiple apps are listed where I can share, e.g, WhatsApp , Ymail , Gmail and others are listed. When I select Whatsapp then Whatsapp, give me option, address to select person, to share, after I select, option, it shares to it.

2nd point is I want my app be, be made available for input sharing
Same as above but reverse.

For receiving from other apps.