产品动态
公告
// Configure the integration package in oh-package.json5dependencies: {"@tencentcloud/timpush": "^VERSION","@tencentcloud/imsdk": "^VERSION",}
import { TIMPushListener, TIMPushManager, TIMPushMessage } from '@tencentcloud/timpush';TIMPushManager.getInstance().registerPush(context, your sdkAppId, "client secret", Chat console certificate ID).then((result) => {HiLog("registerPush success:", result.message);}).catch((error: Error) => {HiLog("registerPush failed", error.code, error.message);})

https://api.im.qcloud.com/v3/offline_push_report/harmonylet pushListener: TIMPushListener = {onNotificationClicked: (data) => {HiLog("onNotificationClicked", data);}}TIMPushManager.getInstance().addPushListener(pushListener);
文档反馈