1
我似乎无法得到在Android中工作的电子邮件。 可能是一些愚蠢的,但我不能找到它:从Android发送电子邮件不工作
final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("text/plain")
.putExtra(android.content.Intent.EXTRA_EMAIL,new String[] { "[email protected]" })
.putExtra(android.content.Intent.EXTRA_SUBJECT,"Exception in Yaniv!")
.putExtra(android.content.Intent.EXTRA_TEXT,"test");
ApplicationControllerBase.getMyApplicationContext().startActivity(Intent.createChooser(emailIntent,
"Send mail...").addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
我没有得到对startActivity命令的任何错误或异常。
=======
编辑:
看来,这是因为这家伙有同样的问题:Android: How to start an activity from an UncaughtExceptionHandler set in application
您不需要标志'Intent.FLAG_A CTIVITY_NEW_TASK',但除此之外,它看起来不错。你是否有空的选择器,或根本没有出现? –