我如何知道如果用户成功完成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.
上一篇:机器人 - 过滤assetManager.list文件按类型机器人、类型、文件、list
下一篇:NullPointerException异常的createBitmap()从查看异常、NullPointerException、createBitmap