# OnTurnBasedMatchInitiatedListener | Android Developers

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 | [Expand All]
public interface

# OnTurnBasedMatchInitiatedListener

com.google.android.gms.games.multiplayer.turnbased.OnTurnBasedMatchInitiatedListener

Known Indirect Subclasses
TurnBasedMultiplayerListener

TurnBasedMultiplayerListener | This interface is deprecated. See `TurnBasedMultiplayer.CancelMatchResult`, `TurnBasedMultiplayer.InitiateMatchResult`, `TurnBasedMultiplayer.LeaveMatchResult`, `TurnBasedMultiplayer.LoadMatchesResult`, `TurnBasedMultiplayer.UpdateMatchResult`, `OnInvitationReceivedListener`, and `OnTurnBasedMatchUpdateReceivedListener`.

This interface is deprecated.
See `TurnBasedMultiplayer.InitiateMatchResult`.

## Class Overview

Listener for receiving callbacks when a match has been initiated.

## Summary

Public Methods
abstract void | onTurnBasedMatchInitiated(int statusCode, TurnBasedMatch match) Called when match has been initiated.

## Public Methods

#### public abstract void onTurnBasedMatchInitiated (int statusCode, TurnBasedMatch match)

Called when match has been initiated. This happens when the player creates a new match, or when the player joins an existing match. Possible status codes include:

- `STATUS_OK` if data was successfully loaded and is up-to-date.
- `STATUS_MATCH_ERROR_ALREADY_REMATCHED` if this is an attempt to rematch a match which has already had a rematch created.
- `STATUS_NETWORK_ERROR_OPERATION_FAILED` if the attempt to initiate the match failed due to network error.
- `STATUS_MULTIPLAYER_ERROR_NOT_TRUSTED_TESTER` if one of the users in the match is not a trusted tester of a game which is not yet published.
- `STATUS_MULTIPLAYER_ERROR_INVALID_OPERATION` if the server rejected the operation.
- `STATUS_MULTIPLAYER_DISABLED` if the game does not support multiplayer.
- `STATUS_CLIENT_RECONNECT_REQUIRED` if the `GamesClient` needs to reconnect to the service to perform this operation.
- `STATUS_INTERNAL_ERROR` if an unexpected error occurred in the service.

##### Parameters

statusCode | A status code indicating the result of the operation.
match | The newly initiated `TurnBasedMatch` object. Note that this may be null, depending on the status code returned.