【问题标题】:Android Activity: ACTION_SENDAndroid 活动:ACTION_SEND
【发布时间】:2013-08-04 21:24:00
【问题描述】:

使用 ACTION_SEND 发送邮件时,有没有办法检查结果是否成功?

这是我的代码示例:

 Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
    emailIntent.setType("plain/text");
    emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL,
            new String[] { "abc@xyz.com" });
    emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,
            "Subject of the Mail");
    emailIntent.putExtra( android.content.Intent.EXTRA_TEXT,
            "This is my sample Mail");
    startActivity(Intent.createChooser(emailIntent, "Email:"));

【问题讨论】:

    标签: android android-intent action send


    【解决方案1】:

    基于此帖子:Get Mail Sent Notification in onActivityResult "Android" 听起来问题在于无法保证负责处理意图的客户端将 setActiviyResult,因此没有一种方法可以获取它。您必须检查处理意图的客户端是否会发回状态。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-05-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-03-09
      • 2017-10-30
      相关资源
      最近更新 更多