In-app Chat
On this page

Class

2026-07-06
ZPNsManagerZPNsMessageReceiver

ZPNsManager

Details

ZPNsManager SDK main class.

Declared in ZPNsManager.java

Methods

getVersion

getVersion
String getVersion()
Gets the SDK's version number.
Declared in ZPNsManager.java

If you encounter an abnormality during the running of the SDK, you can submit the problem, log and other information to the ZEGO technical staff to locate and troubleshoot. Developers can also collect current SDK version information through this API, which is convenient for App operation statistics and related issues.

  • When to call:Any time.
  • Caution:None.
  • Available since:1.0.0
  • Restrictions:None.

SDK version.

setPushConfig

static
setPushConfig
void setPushConfig(ZPNsConfig config)
Set push Settings for each vendor.
Declared in ZPNsManager.java

Parameters

NameTypeDescription
configZPNsConfig

Details

Set push Settings for each vendor.

  • Use cases:Developers need to use this method to set up configurations pushed by vendors.
  • Caution:Called when vendor push needs to be set.
  • Available since:2.0.0 or later.

getInstance

static
getInstance
ZPNsManager getInstance()
Get the ZPNs instance.
Declared in ZPNsManager.java
  • Supported Versions:2.0.0 and above. Detailed Description: When using the ZPNs SDK, developers shall directly call this API to obtain the internal singleton object instead of creating and maintaining the object on their own.
  • Calling Timing:Any time.
  • Usage Restrictions:None.
  • Caution:This method must be used to get the ZPNs singleton object when utilizing ZPNs.

SDK singleton object for subsequent API calls

enableDebug

static
enableDebug
void enableDebug(boolean isDebug)
Whether to enable debug mode.
Declared in ZPNsManager.java

Parameters

NameTypeDescription
isDebugbooleanSwitch test mode.

Details

whether to enable debug mode.

  • Supported versions:2.0.0 and above.

setEventHandler

setEventHandler
void setEventHandler(ZPNsPushEventHandler handler)
Sets up the event notification callbacks that need to be handled.
Declared in ZPNsManager.java

Parameters

NameTypeDescription
handlerZPNsPushEventHandlerFunction to receive notifications.
  • Supported versions:2.0.0 and above. Detailed description: Set event notification callbacks for listening to ZPNs registration status and other events.
  • Usage restrictions:None.
  • Caution:When this API is called multiple times with different eventHandler objects, the last object will override the previously set objects; if the eventHandler object passed to this API is null, the event callback notification will be canceled.

getPushConfig

getPushConfig
void getPushConfig()
Gets the PushConfig data class.
Declared in ZPNsManager.java

Get the PushConfig data class object.

  • Use cases:This method is called when the developer needs to get the PushConfig data class object. When to call /Trigger: There is no time limit to call, developers can call when they need.
  • Available since:2.0.0 or later.

getZPNsMessage

getZPNsMessage
void getZPNsMessage()
When the user clicks on the notification bar to jump to an activity, you can use this interface to obtain payload and other information.
Declared in ZPNsManager.java
  • Available since:2.5.0 or later. When to call /Trigger: Called in the onCreate or onResume method in the activity.

registerPush

registerPush
void registerPush(Application context)
This method is used to register vendor offline push.
Declared in ZPNsManager.java

Parameters

NameTypeDescription
contextApplicationApplication context

Details

This method is used to register vendor offline push.

  • Use cases:This method is called when a developer needs to use offline push.
  • Available since:ZPNs 2.0.0 or later.

unregisterPush

unregisterPush
void unregisterPush()
Call this method to de-register when offline push is not required.
Declared in ZPNsManager.java

Call this method to de-register when offline push is not required.

  • Use cases:This method can be called to de-register when a user clicks a close message notification within the application. When to call /Trigger: Called when de-registration is required.
  • Caution:It needs to be called after [registerPush] is called.
  • Available since:2.0.0 or later.

setApplicationIconBadgeNumber

setApplicationIconBadgeNumber
void setLocalBadge(Context context, int badge)
Set the number of app local badge markers.
Declared in ZPNsManager.java

Parameters

NameTypeDescription
contextContextAndroid environment context.
badgeintThe value to be set.

Details

Set the number of app local corner markers.It supports Apple's related APIs .

  • Use cases:Called when the developer needs to modify the number of local corner markers.
  • Default value:None.
  • Available since:ZPNs version 2.6.0 or later.

ZPNsMessageReceiver

Details

ZPNsManager SDK event handler class.

Declared in ZPNsMessageReceiver.java

Methods

onRegistered

onRegistered
void onRegistered(Context context, ZPNsRegisterMessage message)
Declared in ZPNsMessageReceiver.java

Parameters

NameTypeDescription
contextContextNone
messageZPNsRegisterMessageNone
  • Available since:2.0.0.

onNotificationClicked

onNotificationClicked
void onNotificationClicked()
Declared in ZPNsMessageReceiver.java
  • Available since:2.0.0.

onNotificationArrived

onNotificationArrived
void onNotificationArrived()
Declared in ZPNsMessageReceiver.java

onThroughMessageReceived

onThroughMessageReceived
void onThroughMessageReceived()
Declared in ZPNsMessageReceiver.java
  • Available since:2.0.0.

Previous

Function Overview

Next

Interface

On this page

Back to top