Android的应用程序的电子邮件撰写 - 如何自动"发送和QUOT;电子邮件
问题描述:
我想使用Android应用程序的本地邮件撰写我的桌子上给我发日志的应用程序崩溃时。
I am trying to use the native email compose in android apps on my table to send me logs when the apps crashes.
在code以下的伟大工程,但本机电子邮件撰写弹出,你必须preSS发送。有没有办法告诉撰写应用程序只需发送电子邮件。它发送一个点击,而无需手动办呢?
The code below works great but the Native Email compose pops up and you have to press send. Is there a way to tell the compose app just to send the email. Send it a click without having to manually do it?
Intent intent = new Intent(Intent.ACTION_SENDTO); // it's not ACTION_SEND
intent.setType("message/rfc822");
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, "Subject of email");
intent.putExtra(Intent.EXTRA_TEXT, "Body of email");
intent.setData(Uri.parse("myeamil@yahoo.com")); // or just "mailto:" for blank
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // this will make such that when user returns to your app, your app is displayed, instead of the email app.
//startActivity(intent);
感谢。
马克斯
Thanks. Max