我想在附件中附加 amr 文件,但我无法附加。我的代码如下:
Intent emailIntent = new Intent(
Intent.ACTION_SEND);
Uri U = Uri.parse(path of amr file);
//System.out.println("uri is:" + U);
emailIntent.putExtra(Intent.EXTRA_EMAIL,
new String[] { "" });
emailIntent.putExtra(
android.content.Intent.EXTRA_SUBJECT,
" from ..");
emailIntent.putExtra(
android.content.Intent.EXTRA_TEXT, ""
+ "\n" + "\n" + "Through application name");
emailIntent.setType("audio/rfc822");
//emailIntent.setType("audio/*");
// emailIntent.putExtra(android.content.Intent.EXTRA_STREAM,U);
emailIntent.putExtra(Intent.EXTRA_STREAM, U);
startActivity(Intent.createChooser(emailIntent,
""));
我用过emailIntent.setType("audio/rfc822") , emailIntent.setType("audio/*"); 和 emailIntent.setType("audio/amr");但没有运气
任何帮助将不胜感激。