Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

close

- - Get Started
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
    - Get the SDK
  - Google Services
- - Google Play
  - Publishing
  - Promoting
  - App Quality
  - Spotlight
  - Open Distribution

## Results

Loading...
Summary: Methods | Inherited Methods | [Expand All]
public static final class

# TurnBasedMatchConfig.Builder

extends Object

java.lang.Object
↳ | com.google.android.gms.games.multiplayer.turnbased.TurnBasedMatchConfig.Builder

## Class Overview

Builder class for `TurnBasedMatchConfig`.

## Summary

Public Methods
TurnBasedMatchConfig.Builder | addInvitedPlayer(String playerId) Add a player ID to invite to the match.
TurnBasedMatchConfig.Builder | addInvitedPlayers(ArrayList<String> playerIds) Add a list of player IDs to invite to the match.
TurnBasedMatchConfig | build() Builds a new `TurnBasedMatchConfig` object.
TurnBasedMatchConfig.Builder | setAutoMatchCriteria(Bundle autoMatchCriteria) Sets the auto-match criteria for the match.
TurnBasedMatchConfig.Builder | setMinPlayers(int minPlayers) Sets the minimum number of players required to start the match.
TurnBasedMatchConfig.Builder | setVariant(int variant) Sets the variant for the match.

[Expand] Inherited Methods

From class java.lang.Object

Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)

## Public Methods

#### public TurnBasedMatchConfig.Builder addInvitedPlayer (String playerId)

Add a player ID to invite to the match.

##### Parameters

playerId | Player ID to invite to the match.

##### Returns

- The builder instance.

#### public TurnBasedMatchConfig.Builder addInvitedPlayers (ArrayList<String> playerIds)

Add a list of player IDs to invite to the match.

##### Parameters

playerIds | One or more player IDs to invite to the match.

##### Returns

- The builder instance.

#### public TurnBasedMatchConfig build ()

Builds a new `TurnBasedMatchConfig` object.

##### Returns

- The built `TurnBasedMatchConfig` instance.

#### public TurnBasedMatchConfig.Builder setAutoMatchCriteria (Bundle autoMatchCriteria)

Sets the auto-match criteria for the match. See `createAutoMatchCriteria(int, int, long)`.

##### Parameters

autoMatchCriteria | The criteria for auto-matching one or more players for the match. If `null`, the match is created with the invited players only.

##### Returns

- The builder instance.

#### public TurnBasedMatchConfig.Builder setMinPlayers (int minPlayers)

Sets the minimum number of players required to start the match.

##### Parameters

minPlayers | The minimum number of players this match can continue with.

##### Returns

- The builder instance.

#### public TurnBasedMatchConfig.Builder setVariant (int variant)

Sets the variant for the match. This is an optional, developer-controlled parameter describing the type of game to play, and is used for auto-matching criteria. Must be either a value from 1 to 1023 (inclusive), or `MATCH_VARIANT_ANY` (the default) if not desired.

##### Parameters

variant | The variant for the match.

##### Returns

- The builder instance.