我将附加文件,但它们显示为(0 字节)下面的代码是我使用的
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("image/jpeg");
emailIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
emailIntent.putExtra(Intent.EXTRA_SUBJECT, "ToDoNot.es");
emailIntent.putExtra(Intent.EXTRA_TEXT, Html.fromHtml(message));
File save_Image;
File temp=null;
save_Image=new File(ToDoViewActivity.this.getFilesDir(),"todofile");
temp=new File(save_Image,"tempfile"+String.valueOf(values.getAsInteger("rowid"))+".jpg");
Uri U = Uri.fromFile(new File("file://"+temp.getPath()));
emailIntent.putExtra(Intent.EXTRA_STREAM,U);
startActivity(Intent.createChooser(emailIntent, "Send email using"));
输出: