Reputation: 59
I am building a chat app where I already finished the chatting feature so now I want to add a sharing feature. Something like if you go to a video on youtube app and click share, a dialog appears listing the apps that you can share the video with. I have a fragment where all the chats appear, now I need to achieve the following things:
When the user clicks the app in share via dialog the fragment containing the chats should pop up.
After the above step is done the user should be able to click on desired chat to share the desired data like in whatsapp.
What I noticed is we can't pop up a fragment because we can't specify the MIME types or actions to a fragment in a manifest file.
Edit 1 : As per Lalit's advice i solved and achieved my first step.Now i need an approach to the second step.
Even a little approach is appreciated Thanks in advance.
Upvotes: 0
Views: 211
Reputation: 11
You can't give an intent filter to a Fragment
, but you can certainly give it to the "Activity
that contains the Fragment
" in the AndroidManifest.
After the Activity
opens, you may switch to that Fragment
.
Upvotes: 1