我得到了一些代码如何share image with instagram
。它完成了,请参阅下面的代码但我想添加标题。我已经添加了代码,share text with image
但它不起作用。我想用函数参数发送位图对象而不是 URI,我该如何添加它。
请参阅下面的代码。
public void shareInstagram(Uri uri) // instead of uri i want to put bitmap object
{
Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);
shareIntent.setType("image/*"); // set mime type
shareIntent.putExtra(Intent.EXTRA_STREAM,uri); // instead of uri i want ot add bitmap image
shareIntent.setPackage("com.instagram.android");
shareIntent.putExtra(Intent.EXTRA_SUBJECT, "Sample subject");
//shareIntent.putExtra(Intent.EXTRA_TEXT, "Sample text");
//shareIntent.putExtra(Intent.EXTRA_TITLE, "Sample title");
startActivity(shareIntent);
}
请帮助我..朋友