监视器消息发送的状态由意向推出=新意图(Intent.ACTION_SEND) [英] Monitor message sent status launched by Intent= new Intent(Intent.ACTION_SEND)
问题描述
我要寻找一种方式来监测 Intent.ACTION_SEND
启动彩信的发送状态,这样我可以在消息返回到我原来的活动正在发送。目前即时通讯使用 startActivityForResult()
与请求code启动它,那里有东西返回,并显示与烤面包和我还使用 Intent.putExtra(exit_on_sent,真)
以便在退出默认信使并返回到原来的活动时发送按钮是pssed $ p $但只给它发送的错觉信息,并不实际监督和等待它被发送。我发现,监控使用 smsManager
短信,等待意图和广播接收器的例子,但作为一个菜鸟,我不确定如果多数民众赞成的方式,我应该使用。任何指导,将AP preciated。
我要寻找一种方式来监测Intent.ACTION_SEND启动彩信的发送状态,这样我可以在被发送的消息回到我原来的活动。
块引用>这是不可能的。首先,你必须在用户选择来处理你的
ACTION_SEND
什么活动没有控制权。其次,这将是最多的其他活动如何实现一个发送操作,以及它们是如何做到这一点是关你的事的作者。
目前即时通讯使用startActivityForResult()
块引用>
ACTION_SEND
不是设计用于startActivityForResult()
;你一般不会得到一个结果。
我还使用Intent.putExtra(exit_on_sent,真)
块引用>无论是什么,那就是无证,不支持,一般忽略了我的大部分
ACTION_SEND
implenters。I am looking for a way to monitor the sent status of a MMS message started by
Intent.ACTION_SEND
so that I can return to my original activity upon the message being sent. Currently Im usingstartActivityForResult()
with a request code to start it so theres something to return and display a toast with and I'm also usingIntent.putExtra("exit_on_sent", true)
so that it exits the default messenger and returns to the original activity when the Send button is pressed but that only gives the illusion that it sent the message and doesn't actually monitor and wait for it to be sent. I have found examples that monitor sms messages that use thesmsManager
, pending intents, and broadcast receivers, but being a noob I'm uncertain if thats the approach I should use. Any guidance would be appreciated.解决方案I am looking for a way to monitor the sent status of a MMS message started by Intent.ACTION_SEND so that I can return to my original activity upon the message being sent.
That is not possible. First, you have no control over what activity the user chooses to handle your
ACTION_SEND
. Second, it would be up to the authors of that other activity how to implement a "send" operation, and how they do that is none of your business.Currently Im using startActivityForResult()
ACTION_SEND
is not designed for use withstartActivityForResult()
; you will not generally get a result.I'm also using Intent.putExtra("exit_on_sent", true)
Whatever that is, that is undocumented, unsupported, and generally ignored my most implenters of
ACTION_SEND
.这篇关于监视器消息发送的状态由意向推出=新意图(Intent.ACTION_SEND)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!