public final class

ParticipantResult

extends Object
implements SafeParcelable
java.lang.Object
   ↳ com.google.android.gms.games.multiplayer.ParticipantResult

Class Overview

Data class used to report a participant's result in a match.

Summary

Constants
int MATCH_RESULT_DISAGREED Constant indicating that this participant had different results reported by different clients.
int MATCH_RESULT_DISCONNECT Constant indicating that this participant disconnected or left during the match.
int MATCH_RESULT_LOSS Constant indicating that this participant lost the match.
int MATCH_RESULT_NONE Constant indicating that this participant had no result for the match.
int MATCH_RESULT_TIE Constant indicating that this participant tied the match.
int MATCH_RESULT_UNINITIALIZED Constant indicating that this participant has not reported a result at all yet.
int MATCH_RESULT_WIN Constant indicating that this participant won the match.
int PLACING_UNINITIALIZED Constant returned by getPlacing() if the participant has not reported a placing in the match yet.
[Expand]
Inherited Constants
From interface android.os.Parcelable
From interface com.google.android.gms.common.internal.safeparcel.SafeParcelable
Fields
public static final ParticipantResultCreator CREATOR
Public Constructors
ParticipantResult(String participantId, int result, int placing)
Public Methods
int describeContents()
String getParticipantId()
int getPlacing()
int getResult()
void writeToParcel(Parcel out, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Constants

public static final int MATCH_RESULT_DISAGREED

Constant indicating that this participant had different results reported by different clients.

Constant Value: 5 (0x00000005)

public static final int MATCH_RESULT_DISCONNECT

Constant indicating that this participant disconnected or left during the match.

Constant Value: 4 (0x00000004)

public static final int MATCH_RESULT_LOSS

Constant indicating that this participant lost the match.

Constant Value: 1 (0x00000001)

public static final int MATCH_RESULT_NONE

Constant indicating that this participant had no result for the match.

Constant Value: 3 (0x00000003)

public static final int MATCH_RESULT_TIE

Constant indicating that this participant tied the match.

Constant Value: 2 (0x00000002)

public static final int MATCH_RESULT_UNINITIALIZED

Constant indicating that this participant has not reported a result at all yet. This will commonly be seen when the match is currently in progress. Note that this is distinct from MATCH_RESULT_NONE,

Constant Value: -1 (0xffffffff)

public static final int MATCH_RESULT_WIN

Constant indicating that this participant won the match.

Constant Value: 0 (0x00000000)

public static final int PLACING_UNINITIALIZED

Constant returned by getPlacing() if the participant has not reported a placing in the match yet. Usually seen when a match is still in progress.

Constant Value: -1 (0xffffffff)

Fields

public static final ParticipantResultCreator CREATOR

Public Constructors

public ParticipantResult (String participantId, int result, int placing)

Parameters
participantId The ID of the participant this result is for.
result The result type for this participant in the match. One of MATCH_RESULT_WIN, MATCH_RESULT_LOSS, MATCH_RESULT_TIE, MATCH_RESULT_NONE, MATCH_RESULT_DISCONNECT, or MATCH_RESULT_DISAGREED.
placing The placing of this participant in the match. Use PLACING_UNINITIALIZED to indicate that no placing should be reported.

Public Methods

public int describeContents ()

public String getParticipantId ()

Returns
  • The ID of the participant this result is for.

public int getPlacing ()

Returns
  • The placing of this participant in the match. PLACING_UNINITIALIZED means that this result has no placing value to report.

public int getResult ()

Returns

public void writeToParcel (Parcel out, int flags)