Android Instagram

后端 未结 2 1133
梦谈多话
梦谈多话 2020-12-20 00:47

please help! I want share my photo into Instagram. I use Intent for sharing, but I don\'t need at all list in Share, such as - Facebook, Instagram, Gmail, Bluetoth... etc. I

相关标签:
2条回答
  • 2020-12-20 01:23

    Create your custom sharing screen that call instagram.

    0 讨论(0)
  • 2020-12-20 01:24

    It is asked a long time ago. But the clear answer is not here. That's why, I want to answer as well.

    I have been used that code below and it worked. It redirects to crop screen of instagram directly. (Of course, Instagram app must be installed on the device.)

    ...
    Intent intent = createInstagramIntent("file://" + filePath);
    startActivity(intent);
    ...
    

    and

    private Intent createInstagramIntent(String uriString) {
        Intent shareIntent = new Intent(Intent.ACTION_SEND);
        shareIntent.setType("image/*");
        shareIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(uriString));
        shareIntent.setPackage("com.instagram.android");
        return shareIntent;
    }
    
    0 讨论(0)
提交回复
热议问题