createChooser发送电子邮件

createChooser发送电子邮件

本文介绍了没有Intent.createChooser发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我的代码是标准的:

  final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); 
emailIntent.setType(plain / text);
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL,new String [] {addresses});
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,subject);
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,message);
startActivity(Intent.createChooser(emailIntent,Send mail ...));

如何?
谢谢。
Charles。

解决方案

参考。可能有帮助



它将在实际设备中打开电子邮件应用程序。在模拟器中它不起作用,很多人都面临着这个&发现这个工作。



- 谢谢


I would like my email to be sent without having the email client ot open on the Android screen.

my code is standard:

final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("plain/text");
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{addresses});
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, message);
startActivity(Intent.createChooser(emailIntent, "Send mail..."));

How to?Thanks.Charles.

解决方案

Refer This. might be helpful

It will open up email application in real device. In emulator it doesn't work, many people have faced this & found this working.

-Thanks

这篇关于没有Intent.createChooser发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 22:54