我正在使用以下代码发送邮件,我需要仅通过 Gmail 发送一个 .text 文件。如何操作?请问是否有人可以帮助我吗?
感谢您的提前感谢。
Intent send = new Intent(Intent.ACTION_SENDTO);
String uriText = "mailto:" + Uri.encode("") +
"?subject=" + Uri.encode("Sample Text") +
"&body=" + Uri.encode("Hi");
Uri uri = Uri.parse(uriText);
send.setData(uri);
startActivity(Intent.createChooser(send, "Send mail..."));
感谢您的提前感谢。