如何创建Google+Plus一键,同时已经使用GooglePlay游戏服务SDK for C++实现了排行榜

How to create Google+ Plus One button while already having Leaderboards implemented using Google Play Game Services SDK for C++?

本文关键字:游戏 服务 GooglePlay SDK for 排行榜 实现 C++ 创建 何创建 Google+Plus      更新时间:2023-10-16

我正在开发一个android应用程序。它已经使用Google Play游戏服务SDK for C实现了排行榜++(Google Games C++SDK文档)。这已经处理了授权。

现在我想添加一个属于Google+平台的Plus One按钮,它是Google Play Servives的一部分。问题是没有C++SDK(Google+平台文档)。我可能可以使用Android API来做这件事,但如何处理已经使用C++SDK编写的排行榜?

有没有办法同时使用Google Play Game Services C++SDK和Android版Google Play Services SDK的Plus One按钮来使用排行榜?这两个API都有登录Google Play Services的授权方法。或者这是否意味着对我来说,唯一的解决方案是使用Android API而不是C++来重写排行榜?

至少,您应该能够通过打开https://plus.google.com/share?url=<url>的URL来使用基于web的共享对话框。您还应该能够从Java代码中触发共享意图,例如:

  Intent shareIntent = new PlusShare.Builder(this)
      .setType("text/plain")
      .setText("Welcome to the Google+ platform.")
      .setContentUrl(Uri.parse("https://developers.google.com/+/"))
      .getIntent();
  startActivityForResult(shareIntent, 0);