我已经编写了这段代码并且它成功地发送了它的发送内容,它可以通过FB,BlueTooth等分享。但我也想分享图像。用户点击图像然后分享按钮和保存按钮将显示。当用户点击“分享按钮”时,点击的图像必须分享为蓝牙,FB,Twitter等。我已经写了这段代码,它的文字工作请告诉我如何发送图像,图像在项目内文件夹@drawable文件夹....
public void shareApp()
{
Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
//setting MIME type for Sharing Content
sharingIntent.setType("text/plain");
sharingIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
String shareBody = "Here is the share content body";
sharingIntent.putExtra(Intent.EXTRA_EMAIL,new String[] {"abc32@yahoo.com"});
sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject Here");
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);
startActivity(Intent.createChooser(sharingIntent, "Share via"));
}