private void CreateClient() { // did we log in with a player id already? If so we don't want to ask which account to use var settings = this.activity.GetSharedPreferences("googleplayservicessettings", FileCreationMode.Private); var id = settings.GetString("playerid", String.Empty); var builder = new GoogleApiClient.Builder(activity, this, this); builder.AddApi(Android.Gms.Games.GamesClass.API); builder.AddScope(Android.Gms.Games.GamesClass.ScopeGames); builder.SetGravityForPopups((int)GravityForPopups); if (ViewForPopups != null) { builder.SetViewForPopups(ViewForPopups); } if (!string.IsNullOrEmpty(id)) { builder.SetAccountName(id); } client = builder.Build(); }
private void CreateClient() { // did we log in with a player id already? If so we don't want to ask which account to use var settings = this.activity.GetSharedPreferences ("googleplayservicessettings", FileCreationMode.Private); var id = settings.GetString ("playerid", String.Empty); var builder = new GoogleApiClient.Builder (activity, this, this); builder.AddApi (Android.Gms.Games.GamesClass.API); builder.AddScope (Android.Gms.Games.GamesClass.ScopeGames); builder.SetGravityForPopups ((int)GravityForPopups); if (ViewForPopups != null) builder.SetViewForPopups (ViewForPopups); if (!string.IsNullOrEmpty (id)) { builder.SetAccountName (id); } client = builder.Build (); }