我创建了一个应用程序,可以发送带有录音的电子邮件。当意图被触发并选择电子邮件作为发送附件的应用程序时,您可以看到有一个附件,但是附件没有被送达。请检查您的代码和设置以确保附件正确发送。
Intent sendIntent = new Intent(Intent.ACTION_SEND);
//Mime type of the attachment (or) u can use sendIntent.setType("*/*")
sendIntent.setType("audio/3gp");
//Subject for the message or Email
sendIntent.putExtra(Intent.EXTRA_SUBJECT, "My Recording");
//Full Path to the attachment
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(fileName));
//Use a chooser to decide whether email or mms
startActivity(Intent.createChooser(sendIntent, "Send email..."));
有什么想法吗?