Android的成功份额的意图 [英] Successful share intent for android

查看:119
本文介绍了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屋!

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