我在操作视图中发送电子邮件,它在 gmail 中运行良好,但如果用户选择任何其他邮件服务,它会用“+”替换空格
like in body text is "check out it is a good day"
it displays as "check+out+it+is+a+good+day"
任何想法如何解决这个问题
这是我发送电子邮件的功能
private void sendToAFriend() {
String subject = "it is a good day ";
String body = "Check out it is a good day";
String uriText =
"mailto:" +
"?subject=" + URLEncoder.encode(subject) +
"&body=" + URLEncoder.encode(body);
Uri uri = Uri.parse(uriText);
Intent sendIntent = new Intent(Intent.ACTION_SENDTO);
sendIntent.setData(uri);
startActivity(Intent.createChooser(sendIntent, "Send email"));
}