如何只与一个共享意图共享2种不同类型?

时间:2015-06-18 13:51:17

标签: android share

在我的应用中,有一个分享按钮,可以调用此方法:

Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);   
String audioClipFileName="bell.mp3";
sendIntent.setType("audio/mp3");
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("android.resource://com.gruchka.guessthesound/" + R.raw.bell));
startActivity(Intent.createChooser(sendIntent, "Get help with:"));

此按钮共享音频文件:' bell.mp3'。 我希望此按钮也共享音频文件下方的文本。 我该如何解决这个问题?感谢

1 个答案:

答案 0 :(得分:-1)

使用以下setType行:

sendIntent.putExtra(Intent.EXTRA_TEXT, "YOUR_TEXT");

仅适用于支持它的应用。

相关问题