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: Nested Classes | Ctors | Methods | Inherited Methods | [Expand All]
public final class

# SubmitScoreResult

extends Object

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

This class is deprecated.
See `ScoreSubmissionData`.

## 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

Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)

## 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

- The appropriate `SubmitScoreResult.Result` or `null` if no result was returned for the given time span.

#### public int getStatusCode ()

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

- `STATUS_OK` if the operation succeeded.
- `STATUS_NETWORK_ERROR_OPERATION_DEFERRED` if the operation could not be completed at this time. The operation will be cached and retried again later.
- `STATUS_NETWORK_ERROR_OPERATION_FAILED` if the operation encountered a non-recoverable network error. In this case, the operation will not be retried.

##### Returns

- The status code of the submit score operation.

#### public String toString ()