cyanide
cyanide

Reputation: 3964

Getting GamesClient instance from Google Play Games SDK v2

The current Google Play Games SDK (v2:20.1.2) defines GamesClient interface, which I need for getSettingsIntent. However, I cannot figure out the way to get an instance of it. For other interfaces, like LeaderboardClient, AchievementClient there are static get methods in PlayGames, but no getGamesClient method there. Any idea?

Upvotes: 0

Views: 55

Answers (1)

tomerpacific
tomerpacific

Reputation: 6455

According to the documentation, PlayGames is a class and not an interface and there is no method to get the GamesClient there.

- static AchievementsClient 
getAchievementsClient(Activity activity)
Returns a new instance of AchievementsClient for use in an Activity.
- static EventsClient   
getEventsClient(Activity activity)
Returns a new instance of EventsClient for use in an Activity.
- static GamesSignInClient  
getGamesSignInClient(Activity activity)
Returns a new instance of GamesSignInClient for use in an Activity.
- static LeaderboardsClient 
getLeaderboardsClient(Activity activity)
Returns a new instance of LeaderboardsClient for use in an Activity.
- static PlayerStatsClient  
getPlayerStatsClient(Activity activity)
Returns a new instance of PlayerStatsClient for use in an Activity.
- static PlayersClient  
getPlayersClient(Activity activity)
Returns a new instance of PlayersClient for use in an Activity.
- static RecallClient   
getRecallClient(Activity activity)
Returns a new instance of RecallClient for use in an Activity.
- static SnapshotsClient    
getSnapshotsClient(Activity activity)
Returns a new instance of SnapshotsClient for use in an Activity.

GamesClient is an interface you need to implement yourself and add your own logic to the methods declared there.

Upvotes: -1

Related Questions