更新时间:2025-03-28 GMT+08:00
分享

自定义拦截共享

在OpenSDKConfig中可配置自定义拦截共享策略

使用场景

当与会者发起共享或收到共享邀请时,可以自定义是否拦截此次共享

注意事项

1.SDK初始化的时候必须传入这个配置sdkConfig才会生效

示例代码
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
sdkConfig.setShareInterceptHandle(new IShareInterceptHandle() {
    @Override
    public void onSelfStartShareIntercept(IHwmCallback<HWMShareInterceptInfo> callback) {
        if (callback != null) {
            HWMShareInterceptInfo HWMShareInterceptInfo = new HWMShareInterceptInfo();
            HWMShareInterceptInfo.setInterrupt(true);
            HWMShareInterceptInfo.setInterruptReason("intercepted by custom");
            callback.onSuccess(HWMShareInterceptInfo);
          }
    }
});

相关文档