Jawad Amjad
Jawad Amjad

Reputation: 2552

Instagram Option in Sharing Intent Android

I am working on an application which will be sharing content on different social sites. The problem is that I cant see the Instagram option in sharing intent. I can see bluetooth, mail, messaging etc but cant see Instagram. I have Instagram application installed on my device. Can any one tell me what issue is this??

Secondly is there any way to customize the options in Sharing Intent? Like I want to exclude messaging from it. Is it possible?

Upvotes: 4

Views: 4267

Answers (2)

Abdullah
Abdullah

Reputation: 8995

Hi here I'm sending an image to Instagram:

Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(MediaStore.Images.Media
.insertImage(getContentResolver(), source, title, description)));
shareIntent.setType("image/jpeg");
startActivity(Intent.createChooser(shareIntent,
getResources().getString(R.string.send_to)));

this only answers the first part of the question.

Upvotes: 6

akshay
akshay

Reputation: 5979

If you want to share image on instagram then you need not to use Intent.createChooser for that, you can use

   shareIntent.setPackage("com.instagram.android");

Upvotes: 2

Related Questions