Instagram Option in Sharing Intent Android

后端 未结 2 525
感动是毒
感动是毒 2021-01-14 04:19

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 blue

相关标签:
2条回答
  • 2021-01-14 04:47

    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");
    
    0 讨论(0)
  • 2021-01-14 04:57

    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.

    0 讨论(0)
提交回复
热议问题