We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

Documents from this version have been archived, and will not continue to be maintained. Please use the latest version.

HMS Core ReferencesGame ServiceClient APIsGame APIsjos.gamesGamePlayerStatistics

com.huawei.hms.jos.games.playerstats.GamePlayerStatistics

The GamePlayerStatistics class returns the game statistics of a player in the statistical period of the past 12 months. An instance of the GamePlayerStatistics type is returned when the getGamePlayerStatistics method of  GamePlayerStatisticsClient is called.

Public Method Summary

Return

Method

float

getAverageOnLineMinutes()

Obtains the average session duration of a player in the statistical period of the past 12 months, in minutes.

int

getDaysFromLastGame()

Obtains the number of days elapsed since a player last played.

int

getPaymentTimes()

Obtains the number of in-app purchases for a player in the statistical period of the past 12 months.

int

getOnlineTimes()

Obtains the number of sessions for a player in the statistical period of the past 12 months.

int

getTotalPurchasesAmountRange()

Obtains the total spending rank of a player in the statistical period of the past 12 months.

Public Methods

public float getAverageOnLineMinutes()

Obtains the average session duration of a player in the statistical period of the past 12 months, in minutes.

Return Values

Type

Description

float

Average session duration of a player, in minutes.

public int getDaysFromLastGame()

Obtains the number of days elapsed since a player last played in the statistical period of the past 12 months.

Return Values

Type

Description

int

Number of days elapsed since a player last played.

public int getPaymentTimes()

Obtains the number of in-app purchases for a player in the statistical period of the past 12 months.

Return Values

Type

Description

int

Number of in-app purchases for a player.

public int getOnlineTimes()

Obtains the number of sessions for a player in the statistical period of the past 12 months.

Return Values

Type

Description

int

Number of sessions for a player.

public int getTotalPurchasesAmountRange()

Obtains the total spending amount rank of a player in the statistical period of the past 12 months.

Return Values

Type

Description

int

Spending rank of a player.

  • 1: no spending

  • 2: less than US$10

  • 3: US$10 or more and less than US$50

  • 4: US$50 or more and less than US$300

  • 5: US$300 or more and less than US$1000

  • 6: more than US$1000


This page may contain third-party content. For details, click here.