In-app Chat
On this page

Interface

2026-07-06
ZPNsConfigZPNsMessage
ZPNsRegisterMessageZPNsLocalMessage
ZPNsNotificationChannelZPNsIOSNotificationArrivedConfig

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
appType: number

Push certificate configuration type.

enableHWPush

enableHWPush
enableHWPush: boolean

Whether to enable Huawei push.

enableMiPush

enableMiPush
enableMiPush: boolean

Whether to enable Xiaomi push.

enableVivoPush

enableVivoPush
enableVivoPush: boolean

Whether to enable VIVO push.

enableOppoPush

enableOppoPush
enableOppoPush: boolean

Whether to enable OPPO push.

enableFCMPush

enableFCMPush
enableFCMPush: boolean

Whether to enable FCM push.

miAppID

miAppID
miAppID: string

If you need to enable Xiaomi push, please also fill in the appID obtained from the Xiaomi console.

miAppKey

miAppKey
miAppKey: string

If you need to enable Xiaomi push, please also fill in the appKey obtained from the Xiaomi console.

oppoAppID

oppoAppID
oppoAppID: string

If you need to enable OPPO push, please also fill in the appID obtained from the OPPO console.

oppoAppSecret

oppoAppSecret
oppoAppSecret: string

If you need to enable OPPO push, please also fill in the appSecret obtained from the OPPO console.

oppoAppKey

oppoAppKey
oppoAppKey: string

If you need to enable OPPO push, please also fill in the appKey obtained from the OPPO console.

vivoAppID

vivoAppID
vivoAppID: string

If you need to enable VIVO push, please also fill in the appID obtained from the VIVO console.

vivoAppKey

vivoAppKey
vivoAppKey: string

If you need to enable VIVO push, please also fill in the appKey obtained from the VIVO console.

hwAppID

hwAppID
hwAppID: string

If you need to enable Huawei push, please also fill in the appID obtained from the Huawei console.

enableHWBadge

enableHWBadge
enableHWBadge: boolean

Whether 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
title: string

Push title. Corresponds to the title field in the [ZIMPushConfig] object filled in when sending a message via ZIM.

content

content
content: string

Push content. Corresponds to the content field in the [ZIMPushConfig] object filled in when sending a message via ZIM.

payload

payload
payload: string

Push extra content. Corresponds to the payload field in the [ZIMPushConfig] object filled in when sending a message via ZIM.

extras

extras
extras: Record<string, any>

The original push payload content, containing all push information.

pushSourceType

pushSourceType
pushSourceType: ZPNsPushSourceType

Push 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
pushID: string

ZPNs push ID. The credential used to receive offline push notifications.

errorCode

errorCode
errorCode: number

Error code. 0 means success.

errorMessage

errorMessage
errorMessage: string

Error 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
title: string

Push title.

content

content
content: string

Push content.

payload

payload
payload: string

Push extra information.

iOSSound

iOSSound
iOSSound: string

Custom iOS push notification sound.

androidSound

androidSound
androidSound: string

Custom Android push notification sound.

channelID

channelID
channelID: string

Android 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
channelID: string

Push notification channel ID.

channelName

channelName
channelName: string

Push notification channel name.

androidSound

androidSound
androidSound: string

Custom 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
isPresentBadge: boolean

Whether to display the badge.

isPresentSound

isPresentSound
isPresentSound: boolean

Whether to display the sound.

isPresentAlert

isPresentAlert
isPresentAlert: boolean

Whether to display the alert.

Previous

Class

Next

Enum

On this page

Back to top