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
ReferencesGame ServiceAndroidGame Service APIscom.huawei.hms.jos.gamesGamesClient

GamesClient

Expand

Interface Info

public interface GamesClient

Provides APIs related to basic game functions, such as obtaining the app ID and setting the position for displaying the game greeting pop-up on the screen.

Public Method Summary

Expand

Qualifier and Type

Method Name and Description

Task<String>

getAppId()

Obtains the app ID of a game.

Task<Void>

setPopupsPosition(int position)

Sets the position for displaying the game greeting and achievement unlocking pop-ups on the screen.

NOTICE

Currently, this API does not support telematics devices.

Public Methods

getAppId

Expand

Method

public Task<String> getAppId()

Obtains the app ID of a game.

Returns

Expand

Type

Description

Task<String>

App ID of a game.

setPopupsPosition

Expand

Method

public Task<Void> setPopupsPosition(int position)

Sets the position for displaying the game greeting and achievement unlocking pop-ups on the screen. If this API is not called, the pop-ups will be displayed at the top of the screen by default.

Parameters

Expand

Name

Description

position

Position for displaying the game greeting and achievement unlocking pop-ups on the screen. Currently, only the 1 option is available, indicating that the pop-ups are displayed at the top of the screen.

Returns

Expand

Type

Description

Task<Void>

Calling result.

Search in References
Enter a keyword.