文档管理中心
我的

GPMCallback

展开

Interface Info

public interface GPMCallback

游戏性能管理SDK回调接口。

Method Summary

展开

Qualifier and Type

Method Name and Description

void

onInitResult(int code, String msg)

性能管理SDK初始化回调

void

onEnableCollector(int code, String msg)

开启数据采集器回调

void

onDisableCollector(int code, String msg)

关闭数据采集器回调。

void

onSetSceneStart(int code, String msg)

设置场景名称回调。

void

onSetSceneStart(int code, String msg)

设置场景标签名称回调。

void

onSetLoadSceneCompleted(int code, String msg)

设置场景加载完成回调。

void

onSetSceneEnd(int code, String msg)

设置场景结束回调。

void

onSetTagStart(int code, String msg)

设置场景标签名称回调。

void

onSetTagEnd(int code, String msg)

设置场景标签结束回调。

void

onSetGameConfigurations(int code, String msg)

设置游戏配置信息回调。

Methods

onInitResult

展开

Method

void onInitResult(int code, String msg)

性能管理SDK初始化回调。

Parameters

展开

Name

Description

code

结果码。

说明

返回值为0则表示成功,返回值为其他则表示失败。

msg

结果码描述信息。

Sample Code
public void onInitResult(int code, String msg) {
   // GPMManager.init接口通过子线程回调通知初始化结果。由于大部分API需要在主线程中调用,请在GPMManager.init回调中合理处理。
    if(code == GPMError.GPM_SUCCESS) 
    {
       // 初始化成功
    }
}

onEnableCollector

展开

Method

void onEnableCollector(int code, String msg)

开启数据采集器回调。

Parameters

展开

Name

Description

code

结果码。

说明

返回值为0则表示成功,返回值为其他则表示失败。

msg

结果码描述信息。

Sample Code
public void onEnableCollector(int code, String msg) {
   // GPMManager.enableCollector接口通过子线程回调通知初始化结果。由于大部分API需要在主线程中调用,请在GPMManager.enableCollector回调中合理处理。
    if(code == GPMError.GPM_SUCCESS) 
    {
       // 开启采集器成功
    }
}

onDisableCollector

展开

Method

void onDisableCollector(int code, String msg)

关闭数据采集器回调。

Parameters

展开

Name

Description

code

结果码。

说明

返回值为0则表示成功,返回值为其他则表示失败。

msg

结果码描述信息。

Sample Code
public void onDisableCollector(int code, String msg) {
   // GPMManager.disableCollector接口通过子线程回调通知初始化结果。由于大部分API需要在主线程中调用,请在GPMManager.disableCollector回调中合理处理。
    if(code == GPMError.GPM_SUCCESS) 
    {
       // 关闭采集器成功
    }
}

onSetSceneStart

展开

Method

void onSetSceneStart(int code, String msg)

设置场景名称回调。

Parameters

展开

Name

Description

code

结果码。

说明

返回值为0则表示成功,返回值为其他则表示失败。

msg

结果码描述信息。

Sample Code
public void onSetSceneStart(int code, String msg) {
   // GPMManager.setSceneStart接口通过子线程回调通知初始化结果。由于大部分API需要在主线程中调用,请在GPMManager.setSceneStart回调中合理处理。
    if(code == GPMError.GPM_SUCCESS) 
    {
       // 设置场景名称成功
    }
}

onSetLoadSceneCompleted

展开

Method

void onSetLoadSceneCompleted(int code, String msg)

设置场景加载完成回调。

Parameters

展开

Name

Description

code

结果码。

说明

返回值为0则表示成功,返回值为其他则表示失败。

msg

结果码描述信息。

Sample Code
public void onSetLoadSceneCompleted(int code, String msg) {
   // GPMManager.setLoadSceneCompleted接口通过子线程回调通知初始化结果。由于大部分API需要在主线程中调用,请在GPMManager.setLoadSceneCompleted回调中合理处理。
    if(code == GPMError.GPM_SUCCESS) 
    {
       // 设置场景加载完成成功
    }
}

onSetSceneEnd

展开

Method

void onSetSceneEnd(int code, String msg)

设置场景结束回调。

Parameters

展开

Name

Description

code

结果码。

说明

返回值为0则表示成功,返回值为其他则表示失败。

msg

结果码描述信息。

Sample Code
public void onSetSceneEnd(int code, String msg) {
   // GPMManager.setSceneEnd接口通过子线程回调通知初始化结果。由于大部分API需要在主线程中调用,请在GPMManager.setSceneEnd回调中合理处理。
    if(code == GPMError.GPM_SUCCESS) 
    {
       // 设置场景结束成功
    }
}

onSetTagStart

展开

Method

void onSetTagStart(int code, String msg)

设置场景标签名称回调。

Parameters

展开

Name

Description

code

结果码。

说明

返回值为0则表示成功,返回值为其他则表示失败。

msg

结果码描述信息。

Sample Code
public void onSetTagStart(int code, String msg) {
   // GPMManager.setTagStart接口通过子线程回调通知初始化结果。由于大部分API需要在主线程中调用,请在GPMManager.setTagStart回调中合理处理。
    if(code == GPMError.GPM_SUCCESS) 
    {
       // 设置场景标签名称成功
    }
}

onSetTagEnd

展开

Method

void onSetTagEnd(int code, String msg)

设置场景标签结束回调。

Parameters

展开

Name

Description

code

结果码。

说明

返回值为0则表示成功,返回值为其他则表示失败。

msg

结果码描述信息。

Sample Code
public void onSetTagEnd(int code, String msg) {
   // GPMManager.setTagEnd接口通过子线程回调通知初始化结果。由于大部分API需要在主线程中调用,请在GPMManager.setTagEnd回调中合理处理。
    if(code == GPMError.GPM_SUCCESS) 
    {
       // 设置场景标签结束成功
    }
}

onSetGameConfigurations

展开

Method

void onSetGameConfigurations(int code, String msg)

设置游戏配置信息回调。

Parameters

展开

Name

Description

code

结果码。

说明

返回值为0则表示成功,返回值为其他则表示失败。

msg

结果码描述信息。

Sample Code
public void onSetGameConfigurations(int code, String msg) {
   // GPMManager.setGameConfigurations接口通过子线程回调通知初始化结果。由于大部分API需要在主线程中调用,请在GPMManager.setGameConfigurations回调中合理处理。
    if(code == GPMError.GPM_SUCCESS) 
    {
       // 设置游戏配置信息成功
    }
}