Android的成功份额的意图 [英] Successful share intent for android
问题描述
我如何知道如果用户成功完成A股意图是什么?例如,如果用户想分享通过Facebook或Twitter的应用程序。
How can i tell if a user successfully completed a share intent? For instance if a user wanted to share an app via Facebook or Twitter.
编辑:
我不是在寻找如何创建一个意图
共享。我想知道,如果用户实际上共享任何东西。还是因为用户打了取消按钮。
I am not looking at how to create an Intent
for sharing. I want to know if the user actually shared anything. Or did the user hit the cancel button.
推荐答案
我不认为这是有保证的方式做到这一点。
I don't think there is an assured way to do it.
您可以使用启动发送 startActivityForResult()
,并希望它处理的意图回复一个活动 RESULT_OK
。但是你不能依赖它总是工作。
You could initiate the send using startActivityForResult()
and hope that the activity which handles the Intent replies with a RESULT_OK
. But you can't rely on it to work always.
这篇关于Android的成功份额的意图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!