Following the deprecation of the Google Sign-In API, we are removing the games v1 SDK in 2026. After February 2025, you will be unable to publish titles that are newly integrated with games v1 SDK, on Google Play. We recommend that you use the games v2 SDK instead.
While existing titles with the previous games v1 integrations continue to function for a couple of years, you are encouraged to migrate to v2 starting June 2025.
PlayerRelationshipInfo
Stay organized with collections
Save and categorize content based on your preferences.
Data object representing the relationship information of a player.
Inherited Constant Summary
From interface android.os.Parcelable
int |
CONTENTS_FILE_DESCRIPTOR |
|
int |
PARCELABLE_STABILITY_LOCAL |
|
int |
PARCELABLE_STABILITY_VINTF |
|
int |
PARCELABLE_WRITE_RETURN_VALUE |
|
Public Method Summary
abstract int |
getFriendStatus()
Retrieves this player's friend status relative to the currently signed-in
player.
|
Inherited Method Summary
From interface
com.google.android.gms.common.data.Freezable
From interface android.os.Parcelable
abstract int |
describeContents()
|
abstract void |
writeToParcel( Parcel arg0,
int arg1)
|
Public Methods
public abstract int getFriendStatus ()
Retrieves this player's friend status relative to the currently signed-in player.
The possible output can be found in
Player.PlayerFriendStatus
.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-24 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-24 UTC."],[[["`PlayerRelationshipInfo` is a data object that holds the relationship details of a player, specifically their friend status with the current user."],["It implements interfaces for data freezing (`Freezable`), data validity checks, and parceling for object transmission (`Parcelable`)."],["The core functionality lies in `getFriendStatus()`, which retrieves a code representing the friendship status (e.g., friend, not a friend, invitation pending)."],["This object's purpose is to encapsulate and provide access to information about the relationship between players within a game context."]]],["`PlayerRelationshipInfo` is a data object providing a player's relationship information. It allows retrieving a player's friend status relative to the signed-in player using `getFriendStatus()`, with possible values defined in `Player.PlayerFriendStatus`. It also includes methods from `Freezable` to `freeze()` and verify data validity with `isDataValid()`. It supports parceling through `describeContents()` and `writeToParcel()` which are inherited from the Parcelable interface.\n"]]