如何连接两个或多个文件发送机器人动作 [英] How to attach two or more files to SEND action on Android
问题描述
我会派在Android上使用ACTION_SEND两个或多个文件,如下的摘录:
I would send two or more files using ACTION_SEND on Android as an excerpt below:
意图(android.content.Intent.ACTION_SEND); emailIntent.setType(纯/文); emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, pokus); emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, 吨); emailIntent.putExtra(android.content.Intent.EXTRA_STREAM,
Intent(android.content.Intent.ACTION_SEND); emailIntent.setType("plain/text"); emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "pokus"); emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "t" ); emailIntent.putExtra(android.content.Intent.EXTRA_STREAM,
emailIntent.putExtra(android.content.Intent.EXTRA_STREAM, Uri.parse(文件:///sdcard/file1.jpg));
emailIntent.putExtra(android.content.Intent.EXTRA_STREAM, Uri.parse("file:///sdcard/file1.jpg"));
emailIntent.putExtra(** android.content.Intent.EXTRA_STREAM, Uri.parse(文件:///sdcard/file2.jpg));
emailIntent.putExtra(**android.content.Intent.EXTRA_STREAM, Uri.parse("file:///sdcard/file2.jpg"));
startActivity(Intent.createChooser(emailIntent, 发送邮件...));
startActivity(Intent.createChooser(emailIntent, "Send mail..."));
但是,code不使用Gmail的工作,它重视的只有最后一个文件。请帮忙 谢谢
But that code does not work with GMail, it attaches only the last file. Please help Thanks
推荐答案
我认为这是不可能的使用Gmail。
I believe it's impossible using GMail.
如果您想programmaticly手动发送电子邮件(跳过的Gmail客户端),那么只要你想,你可以连接尽可能多的项目,采用了android-javamailer:
If you want to programmaticly send email manually (skipping the GMail client), then you could attach as many items as you want, using android-javamailer:
<一个href="http://www.jondev.net/articles/Sending_Emails_without_User_Intervention_%28no_Intents%29_in_Android" rel="nofollow">http://www.jondev.net/articles/Sending_Emails_without_User_Intervention_%28no_Intents%29_in_Android
这篇关于如何连接两个或多个文件发送机器人动作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!