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 ServiceGameKit APIsGameCallback

GameCallback

interface info
public interface GameManager.GameCallback
Represents an internal API used by the GameManager to obtain device information such as the temperature.

Public Method Summary

ReturnMethod
voidonPhoneInfoUpdated(String info)

Public Methods

Method
public void onPhoneInfoUpdated(String info)
Represents the callback used to obtain device information such as the temperature. The device information obtained using this method is in the same format as that obtained by using the getPhoneInfo() method of GameManager.

Parameters

Parameter nameParameter desc
String infoIndicates the device information, for example, temperature information.
The value may be null or empty, probably because the app is not registered or fails to be registered, or the system has not reported device information.
The device returns the key resource information, including the current temperature level.
Example in the JSON format:
{
“MessageType”:20001,
“TempCurLevel”:3
}
[Type] int. [Field] MessageType. [Description] Mandatory. The value 20001 indicates the key resource message returned by the system.
[Type] byte. [Field] TempCurLevel. [Description] Mandatory. Indicates the current temperature level.
1: normal; 2: medium; 3: high.
This page may contain third-party content. For details, click here.
Search in References
Enter a keyword.