Interface
| ZPNsConfig | ZPNsMessage |
| ZPNsRegisterMessage | ZPNsLocalMessage |
| ZPNsNotificationChannel | ZPNsIOSNotificationArrivedConfig |
ZPNsConfig
ZPNs offline push configuration information.
Details
Description: Before using the offline push capability, developers need to fill in this configuration according to the configuration information obtained from each push vendor.
Declared in ZPNsDefines.ts
Properties
appType
appType: numberPush certificate configuration type.
enableHWPush
enableHWPush: booleanWhether to enable Huawei push.
enableMiPush
enableMiPush: booleanWhether to enable Xiaomi push.
enableVivoPush
enableVivoPush: booleanWhether to enable VIVO push.
enableOppoPush
enableOppoPush: booleanWhether to enable OPPO push.
enableFCMPush
enableFCMPush: booleanWhether to enable FCM push.
miAppID
miAppID: stringIf you need to enable Xiaomi push, please also fill in the appID obtained from the Xiaomi console.
miAppKey
miAppKey: stringIf you need to enable Xiaomi push, please also fill in the appKey obtained from the Xiaomi console.
oppoAppID
oppoAppID: stringIf you need to enable OPPO push, please also fill in the appID obtained from the OPPO console.
oppoAppSecret
oppoAppSecret: stringIf you need to enable OPPO push, please also fill in the appSecret obtained from the OPPO console.
oppoAppKey
oppoAppKey: stringIf you need to enable OPPO push, please also fill in the appKey obtained from the OPPO console.
vivoAppID
vivoAppID: stringIf you need to enable VIVO push, please also fill in the appID obtained from the VIVO console.
vivoAppKey
vivoAppKey: stringIf you need to enable VIVO push, please also fill in the appKey obtained from the VIVO console.
hwAppID
hwAppID: stringIf you need to enable Huawei push, please also fill in the appID obtained from the Huawei console.
enableHWBadge
enableHWBadge: booleanWhether to enable the Huawei app badge feature.
ZPNsMessage
ZPNs offline push message.
Details
Description: The message object delivered by the Zego server through the mobile vendor push channel, carrying the properties required for offline push.
Declared in ZPNsDefines.ts
Properties
title
title: stringPush title. Corresponds to the title field in the [ZIMPushConfig] object filled in when sending a message via ZIM.
content
content: stringPush content. Corresponds to the content field in the [ZIMPushConfig] object filled in when sending a message via ZIM.
payload
payload: stringPush extra content. Corresponds to the payload field in the [ZIMPushConfig] object filled in when sending a message via ZIM.
extras
extras: Record<string, any>The original push payload content, containing all push information.
pushSourceType
pushSourceType: ZPNsPushSourceTypePush source vendor type.
ZPNsRegisterMessage
ZPNs registration event information.
Details
Description: After the [registerPush] API call succeeds, developers can obtain the ZPNs registration result and information such as pushID here.
Declared in ZPNsDefines.ts
Properties
pushID
pushID: stringZPNs push ID. The credential used to receive offline push notifications.
errorCode
errorCode: numberError code. 0 means success.
errorMessage
errorMessage: stringError description information.
ZPNsLocalMessage
ZPNs local push message.
Details
Description: Returned after the developer calls the API to add a local push notification.
Declared in ZPNsDefines.ts
Properties
title
title: stringPush title.
content
content: stringPush content.
payload
payload: stringPush extra information.
iOSSound
iOSSound: stringCustom iOS push notification sound.
androidSound
androidSound: stringCustom Android push notification sound.
channelID
channelID: stringAndroid push notification channel ID.
ZPNsNotificationChannel
Android push notification channel.
Details
Description: Developers need to create a push notification channel by passing in this channel parameter.
Declared in ZPNsDefines.ts
Properties
channelID
channelID: stringPush notification channel ID.
channelName
channelName: stringPush notification channel name.
androidSound
androidSound: stringCustom Android push notification sound.
ZPNsIOSNotificationArrivedConfig
iOS push notification arrival behavior configuration.
Details
Description: Developers can use this configuration to determine whether to display an alert, badge, or sound when an iOS foreground push notification arrives.
Declared in ZPNsDefines.ts
Properties
isPresentBadge
isPresentBadge: booleanWhether to display the badge.
isPresentSound
isPresentSound: booleanWhether to display the sound.
isPresentAlert
isPresentAlert: booleanWhether to display the alert.
