我的分享功能如下
public void share(String shareBody)
{
Intent sharingIntent=new Intent(android.content.Intent.ACTION_SEND);
sharingIntent.setType("text/plain");
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);
startActivity(Intent.createChooser(sharingIntent, "Share Via"));
}
假设函数参数是“Hello John!”,我选择了Chooser的'WhatsApp'应用程序,它显示“主题 - Hello Hello!”而不仅仅是“ 你好约翰!“。
我甚至尝试过
public void share(String shareBody)
{
Intent sharingIntent=new Intent(android.content.Intent.ACTION_SEND);
sharingIntent.setType("text/plain");
sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,"" );
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);
startActivity(Intent.createChooser(sharingIntent, "Share Via"));
}
但是,结果相同。有人可以帮我吗?