更新时间:2024-01-24 GMT+08:00
分享

场景12:退出

描述

在第三方APP退出时,需要去初始化SDK,否则名称为HwmSdk.exe的进程(Electron SDK的windows 64位下的主进程)一直在后台运行,仅针对windows 64位平台。

业务流程

需要退出SDK时,调用Exit同步接口。

  1. 接口调用

    1. 调用Exit退出SDK。

示例代码

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
/**
* 退出sdk
*/
async exitSdk(){
    const apiService = await new ApiService();
    let setResult = await apiService.exit();
    if(setResult != 0){
        window.electron.ipcRenderer.send("show-error-alert", "exit error = " + setResult);
    }
}
1
2
3
4
5
6
7
8
9
/**
* ApiService中exit接口定义
*/
exit() {
  console.log("exit, in param = ");
  let ret = this.uisdkService.exit();
  console.log("exit, out data = ", ret);
  return ret;
}
分享:

    相关文档

    相关产品