public interface

# Multiplayer

com.google.android.gms.games.multiplayer.Multiplayer

## Class Overview

Common constants/methods for multiplayer functionality.

## Summary

Constants
String | EXTRA_EXCLUSIVE_BIT_MASK | Used to bundle the exclusive bit mask of the player for auto-match criteria.
String | EXTRA_INVITATION | Used to return an `Invitation`.
String | EXTRA_MAX_AUTOMATCH_PLAYERS | Used to return the maximum number of players that should be added to a room by auto-matching.
String | EXTRA_MIN_AUTOMATCH_PLAYERS | Used to return the minimum number of players that should be added to a room by auto-matching.
String | EXTRA_ROOM | Used to return a `Room`.
String | EXTRA_TURN_BASED_MATCH | Used to return a `TurnBasedMatch`.
int | MAX_RELIABLE_MESSAGE_LEN | This gives the maximum message size supported via the `sendReliableMessage(GoogleApiClient, RealTimeMultiplayer.ReliableMessageSentCallback, byte[], String, String)` methods (excluding protocol headers).
int | MAX_UNRELIABLE_MESSAGE_LEN | This gives the maximum (unfragmented) message size supported via the `sendUnreliableMessage(GoogleApiClient, byte[], String, String)` methods (excluding protocol headers).
int | SORT_ORDER_MOST_RECENT_FIRST | Sort multiplayer activities by their last-modified timestamp with most recent first.
int | SORT_ORDER_SOCIAL_AGGREGATION | Sort multiplayer activities such that activities from players in the user's circles are returned first.

## Constants

#### public static final String EXTRA_EXCLUSIVE_BIT_MASK

Used to bundle the exclusive bit mask of the player for auto-match criteria.

Constant Value: "exclusive_bit_mask"

#### public static final String EXTRA_INVITATION

Used to return an `Invitation`. Retrieve with `getParcelableExtra(String)` or `getParcelable(String)`.

Constant Value: "invitation"

#### public static final String EXTRA_MAX_AUTOMATCH_PLAYERS

Used to return the maximum number of players that should be added to a room by auto-matching. Retrieve with `getIntExtra(String, int)`.

##### See Also

- `getSelectOpponentsIntent(GoogleApiClient, int, int)`
- `getSelectOpponentsIntent(GoogleApiClient, int, int)`

Constant Value: "max_automatch_players"

#### public static final String EXTRA_MIN_AUTOMATCH_PLAYERS

Used to return the minimum number of players that should be added to a room by auto-matching. Retrieve with `getIntExtra(String, int)`.

##### See Also

- `getSelectOpponentsIntent(GoogleApiClient, int, int)`
- `getSelectOpponentsIntent(GoogleApiClient, int, int)`

Constant Value: "min_automatch_players"

#### public static final String EXTRA_ROOM

Used to return a `Room`. Retrieve with `getParcelableExtra(String)`.

Constant Value: "room"

#### public static final String EXTRA_TURN_BASED_MATCH

Used to return a `TurnBasedMatch`. Retrieve with `getParcelableExtra(String)` or `getParcelable(String)`.

Constant Value: "turn_based_match"

#### public static final int MAX_RELIABLE_MESSAGE_LEN

This gives the maximum message size supported via the `sendReliableMessage(GoogleApiClient, RealTimeMultiplayer.ReliableMessageSentCallback, byte[], String, String)` methods (excluding protocol headers).

Constant Value: 1400 (0x00000578)

#### public static final int MAX_UNRELIABLE_MESSAGE_LEN

This gives the maximum (unfragmented) message size supported via the `sendUnreliableMessage(GoogleApiClient, byte[], String, String)` methods (excluding protocol headers).

Constant Value: 1168 (0x00000490)

#### public static final int SORT_ORDER_MOST_RECENT_FIRST

Sort multiplayer activities by their last-modified timestamp with most recent first.

Constant Value: 0 (0x00000000)

#### public static final int SORT_ORDER_SOCIAL_AGGREGATION

Sort multiplayer activities such that activities from players in the user's circles are returned first.

Constant Value: 1 (0x00000001)