智慧服务,成就美好体验 项目咨询

主页 > 服务与支持 > 开发平台 > 客户端SDK参考 > Android UI SDK > 接口参考 注销

入门使用

注销

更新时间:2019-11-20

clmLogout

接口描述

该接口用于已登录帐号的注销。

注意事项

请在存在已登录帐号的场景下调用。

方法定义

    /**
     * 注销接口
     * @param handler 回调对象
     */
    void clmLogout(@NonNull CLMCompleteHandler handler);
 

参数描述

表1 参数说明

参数

是否必须

类型

描述

handler

CLMCompleteHandler

回调处理对象

返回值

无。

代码示例

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
if(getActivity() != null){
  ((DemoActivity)getActivity()).showLoading();
}
CloudLinkSDK.getOpenApi().clmLogout(new completeHandler() {
  pubilc void onCompleted(CLMResult result) {
    if(getActivity() != null){
      ((DemoActivity)getActivity()).dismissLoading();
    }
    if(result.getCode() == 0){
      DemoUtil.showToast(getContext(), "登出成功");
    } else {
      DemoUtil.showToast(getContext(), result.getMessage());
    }
  }
});