【问题标题】:Which method is called after post is shared on google plus(Call back method) in Android在Android中的google plus(回调方法)上分享帖子后调用哪个方法
【发布时间】:2013-08-16 10:30:43
【问题描述】:

在 Android 应用程序中,我遵循了本教程: Share Post on google plus

@Override
public void onClick(View v) {

    String tripDetails = "Test;
    Intent shareIntent = new PlusShare.Builder(this)
            .setText(tripDetails)
            .setType("image/png")
            .setContentDeepLinkId("Testing",
                    "Testing",
                    "Description.",
                    Uri.parse("https://www.example.com/image.png"))
            .getIntent();
    startActivityForResult(shareIntent, 0);

}

运行成功,帖子也分享到了google plus。

但我不知道在 google plus 上共享 Post 之后调用哪个方法,以及何时返回应用程序。那么你知道任何回调方法吗?

任何帮助将不胜感激。

【问题讨论】:

  • startActivitystartActivityForResult之后,它被称为setResult()finish()
  • 您在问题标签中添加了深层链接。你的意思是如何处理深度链接?如果没有,那么你必须重写 onActivityResult 方法

标签: android share google-plus deep-linking


【解决方案1】:

onActivityResult 方法将被调用。因此,在 onActivityResult 方法中发布后处理您的 UI 更改

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多