【发布时间】:2016-05-15 09:46:50
【问题描述】:
我想将我的 xamarin android 应用与 google play services 排行榜和成就集成。我不知道如何将下面的代码从 android documentation 转换为 c#。
// Create the Google Api Client with access to the Play Game and Drive services.
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.addApi(Games.API).addScope(Games.SCOPE_GAMES)
.addApi(Drive.API).addScope(Drive.SCOPE_APPFOLDER) // Drive API
.build();
// ...
我尝试转换如下内容
GoogleApiClient api = new GoogleApiClient.Builder(this)
.AddApi(Android.Gms.Games.API)
.Build();
在“Android.Gms.Games.API”下报错
this 堆栈溢出线程中提到的所有事情都不起作用。看起来大部分这些东西都已弃用。
如果有其他简单的方法可以与排行榜集成,请提出建议。
编辑:进行了更改,现在给出以下错误。
【问题讨论】:
标签: c# android xamarin xamarin.android