Instagram Option in Sharing Intent Android

2020-03-24 04:16发布

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?

2条回答
够拽才男人
2楼-- · 2020-03-24 05:00

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.

查看更多
看我几分像从前
3楼-- · 2020-03-24 05:04

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");
查看更多
登录 后发表回答