public final class

PlayerLevelInfo

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

Class Overview

Data object representing the current level information of a player in the metagame.

A PlayerLevelInfo has four components: the player's current XP, the timestamp of the player's last level-up, the player's current level, and the player's next level.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
From interface com.google.android.gms.common.internal.safeparcel.SafeParcelable
Fields
public static final PlayerLevelInfoCreator CREATOR
Public Methods
int describeContents()
boolean equals(Object obj)
PlayerLevel getCurrentLevel()
Getter for the player's current level object.
long getCurrentXpTotal()
long getLastLevelUpTimestamp()
PlayerLevel getNextLevel()
Getter for the player's next level object.
int hashCode()
boolean isMaxLevel()
void writeToParcel(Parcel out, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final PlayerLevelInfoCreator CREATOR

Public Methods

public int describeContents ()

public boolean equals (Object obj)

public PlayerLevel getCurrentLevel ()

Getter for the player's current level object. This object will be the same as the one returned from getNextLevel() if the player reached the maximum level.

Returns
  • The player's current level object.
See Also

public long getCurrentXpTotal ()

Returns
  • The player's current XP value.

public long getLastLevelUpTimestamp ()

Returns
  • The timestamp of the player's last level-up.

public PlayerLevel getNextLevel ()

Getter for the player's next level object. This object will be the same as the one returned from getCurrentLevel() if the player reached the maximum level.

Returns
  • The player's next level object.
See Also

public int hashCode ()

public boolean isMaxLevel ()

Returns

public void writeToParcel (Parcel out, int flags)