public final class

SubmitScoreResult

extends Object
java.lang.Object
   ↳ com.google.android.gms.games.leaderboard.SubmitScoreResult

Class Overview

Data object representing the result of submitting a score to a leaderboard.

Summary

Nested Classes
class SubmitScoreResult.Result Simple data class containing the result data for a particular time span. 
Public Constructors
SubmitScoreResult(int statusCode, String leaderboardId, String playerId, HashMap<Integer, SubmitScoreResult.Result> results)
Construct a new result describing a SubmitScore operation.
SubmitScoreResult(int statusCode, String leaderboardId, String playerId)
Public Methods
String getLeaderboardId()
Retrieves the ID of the leaderboard the score was submitted to.
String getPlayerId()
Retrieves the ID of the player the score was submitted for.
SubmitScoreResult.Result getScoreResult(int timeSpan)
Retrieves the SubmitScoreResult.Result object for the given time span, if any.
int getStatusCode()
Retrieve the status code of the submit score operation.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SubmitScoreResult (int statusCode, String leaderboardId, String playerId, HashMap<Integer, SubmitScoreResult.Result> results)

Construct a new result describing a SubmitScore operation.

Parameters
statusCode The status code (from GamesClient) to report to the client.
leaderboardId The leaderboard ID the score was submitted to.
playerId The player whose score was submitted.
results A map from timespan to result for that timespan.

public SubmitScoreResult (int statusCode, String leaderboardId, String playerId)

Public Methods

public String getLeaderboardId ()

Retrieves the ID of the leaderboard the score was submitted to.

Returns
  • The ID of the leaderboard.

public String getPlayerId ()

Retrieves the ID of the player the score was submitted for.

Returns
  • The ID of submitting player.

public SubmitScoreResult.Result getScoreResult (int timeSpan)

Retrieves the SubmitScoreResult.Result object for the given time span, if any.

Parameters
timeSpan Time span to retrieve result for. Valid values are TIME_SPAN_DAILY, TIME_SPAN_WEEKLY, or TIME_SPAN_ALL_TIME.
Returns

public int getStatusCode ()

Retrieve the status code of the submit score operation. This will be one of the following values:

Returns
  • The status code of the submit score operation.

public String toString ()