我尝试在视频中添加文字(标题),我想分享:
public void shareVideoWhatsApp()
{
Intent videoshare = new Intent(Intent.ACTION_SEND);
videoshare.setType("*/*");
String downloadurl = "Here comes the url";
videoshare.putExtra(Intent.EXTRA_TEXT, downloadurl);
videoshare.putExtra(Intent.EXTRA_STREAM, Uri.parse(StorageHandlerSDcard.getPath('v') + "/" + "video.mp4"));
if(isPackageInstalled("com.whatsapp",this))
{
videoshare.setPackage("com.whatsapp");
startActivity(Intent.createChooser(videoshare, "Share video and caption"));
}
else
{
Toast.makeText(getApplicationContext(), "Whatsapp is not installed!", Toast.LENGTH_LONG).show();
}
}
视频是在没有标题的情况下共享的。您是否有任何想法通过WhatsApp和Intent同时分享视频和标题/文本?