gpt4 book ai didi

安卓 Activity : ACTION_SEND

转载 作者:行者123 更新时间:2023-11-30 03:27:19 26 4
gpt4 key购买 nike

当使用 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:"));

最佳答案

基于这篇文章:Get Mail Sent Notification in onActivityResult "Android"听起来问题在于无法保证负责处理 Intent 的客户端会去设置 ActiviyResult,因此没有一种方法可以获取它。您必须检查处理 Intent 的客户端是否会发回状态。

关于安卓 Activity : ACTION_SEND,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18036673/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com