电子邮件:哪些是Intent.ACTION_SEND返回值? [英] email: Which are Intent.ACTION_SEND return values?

查看:349
本文介绍了电子邮件:哪些是Intent.ACTION_SEND返回值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我启动

startActivity(new Intent(Intent.ACTION_SEND)) 

发送一封电子邮件,这是返回的值,我可以在测试

for sending an email, which are the returned values that I can test in the

onActivityResult(){...} 

由于(例如):

  • 如果用户退出电子邮件客户端点击苏取消,我想执行methodX(...)
  • 否则我会执行methodY(...)

不过来执行,我需要知道的意图返回的值。这可能吗?

But to perform that, I need to know the Intent returned values. Is it possible?

推荐答案

我不认为这是指定的。

您不能确定哪些活动最终会处理你的意图,而每个活动可以返回不同的结果codeS为同一个合乎逻辑的结果。

You can't be sure which Activity will end up handling your intent, and each Activity could return different resultCodes for the same logical outcome.

在我的测试在模拟器中的短信应用程序返回零不管结果如何。

In my testing the text messaging app in the emulator returned zero no matter the outcome.

这篇关于电子邮件:哪些是Intent.ACTION_SEND返回值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆