Reputation: 11782
I want to show a dialog with specific apps list and want to share my picture along with text message.
Something like this but I want to add only few e.g Facebook
and Twitter
.
How can I do that?
Upvotes: 1
Views: 196
Reputation: 56925
I think to achieve this you need to create your own Alert Dialog with specific application, and share picture with that specific application when user click on it.
Edit : sharingIntent.setType("text/plain");
// for plain text
sharingIntent.setType("image/jpeg"); // For Jpeg Image
It is possible to target specific applications using the “setType” method, but this can be a risky strategy, potentially causing problems if the user does not have those particular apps installed. By keeping the sharing function as generic as possible, you give your users control over how they want to share your content. Sticking to the standard behaviour for sharing in Android applications also creates an intuitive user experience.
Edit : Look Here for Example .
Upvotes: 2
Reputation: 3485
i think you make your custome dialog to share item, or this may helps you
Intent shareIntent = new Intent();
shareIntent.setType("application/bluetooth");
// here use specific type of Application
startActivity(Intent.createChooser(shareIntent, "Share with"));
Upvotes: 0