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

# OnInvitationReceivedListener

com.google.android.gms.games.multiplayer.OnInvitationReceivedListener

Known Indirect Subclasses
TurnBasedMultiplayerListener

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

## Class Overview

Listener to invoke when a new invitation is received.

## Summary

Public Methods
abstract void | onInvitationReceived(Invitation invitation) Callback invoked when a new invitation is received.
abstract void | onInvitationRemoved(String invitationId) Callback invoked when a previously received invitation has been removed from the local device.

## Public Methods

#### public abstract void onInvitationReceived (Invitation invitation)

Callback invoked when a new invitation is received. This allows an app to respond to the invitation as appropriate. If the app receives this callback, the system will not display a notification for this invitation.

##### Parameters

invitation | The invitation that was received.

#### public abstract void onInvitationRemoved (String invitationId)

Callback invoked when a previously received invitation has been removed from the local device. For example, this might occur if the inviting player leaves the match.

##### Parameters

invitationId | The ID of the invitation that was removed.