Intelligent Assistant
Chat with our virtual assistant to get answers promptly.
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.
HUAWEI HMS Core
Documents from this version have been archived, and will not continue to be maintained. Please use the latest version.
The GameSummaryClient class defines the APIs for obtaining game information.
Return | Method |
Task<GameSummary> | Obtains the information about the current game from the local cache. |
Task<GameSummary> | Obtains the information about the current game from Huawei game server. If the obtaining fails, the locally cached information is obtained. |
Obtains the information about the current game from the local cache asynchronously.
Return Values
Type | Description |
Task<GameSummary> | GameSummary object that contains the information about the current game. |
You need to set two callback listeners in the Task returned by the API. OnSuccessListener obtains the data returned in the success scenario, and OnFailureListener obtains the information about the request failure. In OnFailureListener, you need to check whether the exception object called back in this mode is an ApiException instance object, and resolve the failure according to getStatusCode() contained in the ApiException instance.
Obtains the information about the current game from Huawei game server asynchronously. If the obtaining fails, the locally cached information is obtained.
Return Values
Type | Description |
Task<GameSummary> | The information about the current game. |
You need to set two callback listeners in the Task returned by the API. OnSuccessListener obtains the data returned in the success scenario, and OnFailureListener obtains the information about the request failure. In OnFailureListener, you need to check whether the exception object called back in this mode is an ApiException instance object, and resolve the failure according to getStatusCode() contained in the ApiException instance.
Intelligent Assistant
Chat with our virtual assistant to get answers promptly.
Quick start
Helps you find desired resources with ease.