IGoogleApiClient buildGoogleApiClient(bool useProfileScope) { var builder = new GoogleApiClientBuilder(this) .AddConnectionCallbacks(this) .AddOnConnectionFailedListener(this); var serverClientId = GetString(Resource.String.server_client_id); if (!string.IsNullOrEmpty(serverClientId)) { builder.RequestServerAuthCode(serverClientId, this); } if (useProfileScope) { builder.AddApi(PlusClass.API) .AddScope(PlusClass.ScopePlusProfile); } else { builder.AddApi(PlusClass.API, new PlusClass.PlusOptions.Builder() .AddActivityTypes(MomentUtil.ACTIONS).Build()) .AddScope(PlusClass.ScopePlusLogin); } return(builder.Build()); }
IGoogleApiClient buildGoogleApiClient(bool useProfileScope) { var builder = new GoogleApiClientBuilder (this) .AddConnectionCallbacks (this) .AddOnConnectionFailedListener (this); var serverClientId = GetString (Resource.String.server_client_id); if (!string.IsNullOrEmpty (serverClientId)) builder.RequestServerAuthCode (serverClientId, this); if (useProfileScope) { builder.AddApi (PlusClass.API) .AddScope (PlusClass.ScopePlusProfile); } else { builder.AddApi (PlusClass.API, new PlusClass.PlusOptions.Builder() .AddActivityTypes (MomentUtil.ACTIONS).Build ()) .AddScope (PlusClass.ScopePlusLogin); } return builder.Build (); }