我正在使用下面的代码向gmail发送电子邮件。在这里,我直接打开gmail的撰写邮件。它工作正常。但我需要将文件附加到该邮件。我该怎么办?请问有人可以帮我吗?
这里我的代码是:
Intent send = new Intent(Intent.ACTION_SENDTO);
String uriText = "mailto:" + Uri.encode("user@gmail.com") +
"?subject=" + Uri.encode("Testing app") +
"&body=" + Uri.encode("Hi,this is android app testing");
Uri uri = Uri.parse(uriText);
send.setData(uri);
startActivity(Intent.createChooser(send, "Send mail..."));
提前致谢。