我试图在电子邮件中发送多个文件,我得到了将它们附加到电子邮件中的代码.
Intent sendIntent = new Intent(Intent.ACTION_SEND_MULTIPLE);
sendIntent.setType("application/octet-stream");
ArrayList<Uri> uris = new ArrayList<Uri>();
uris.add(0, Uri.parse("file://"+Environment.getExternalStorageDirectory()+ "/.file"));
File f = getActivity().getDatabasePath(".db");
Log.i(TAG,"DB path"+ f.getAbsolutePath());
uris.add(1, Uri.fromFile(f));
sendIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris);
Run Code Online (Sandbox Code Playgroud)
但现在,我需要将它们压缩成单个zip文件,然后我必须通过电子邮件发送它们.好吧,我看到了许多答案和想法,但我仍然无法得到一些明确的想法.你能帮助我解决这个问题.