1

我正在开发一个android应用程序。它已经使用谷歌Play游戏服务SDK C++ (Google Games C++ SDK Documentation)实现了leaderboadrs。这已经处理了授权。如何在使用Google Play游戏服务SDK for C++实现排行榜时创建Google+ Plus One按钮?

现在我想添加属于Google Play服务的一部分的Google+平台的加号按钮。问题是没有C++ SDK(Google+ Platform Documentation)。我可以使用Android API来完成它,但是如何处理已经使用C++ SDK编写的排行榜?

是否有任何方式可以同时使用Google Play服务SDK for Android的Google Play游戏服务C++ SDK和Plus One按钮使用排行榜?这两种API都有其登录Google Play服务的授权方法。或者这是否意味着我唯一的解决方案是使用Android API而不是C++来重写排行榜?

回答

0

至少,您应该能够通过打开https://plus.google.com/share?url=<url>的URL来使用基于Web的共享对话框。您还应该能够trigger the share intent from Java code,例如:

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); 
相关问题