4

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?

Jawad Amjad
  • 2,532
  • 2
  • 29
  • 59
  • instagram is not a inbuilt application – sravan Jul 03 '12 at 10:22
  • Yes its not built in . But I have installed it. It should come on that intent? – Jawad Amjad Jul 03 '12 at 10:24
  • I don't think you can customize what apps appear there. The does depend, however, on what data you are sending through. If the app doesn't support some of the data you're trying to send it won't appear. It can also require some data (say text) be sent through, so you just need to experiment. – Joru Jul 03 '12 at 10:49
  • can you guide me? What type of data is supported by all of them? I am using text data right now. – Jawad Amjad Jul 04 '12 at 05:21

2 Answers2

6

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.

Abdullah
  • 9,005
  • 1
  • 23
  • 24
2

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");
akshay
  • 5,811
  • 5
  • 39
  • 58