Cross-application offline push
Overview
This document can be a reference if you want to use a ZEGOCLOUD AppID to implement offline push communication between two APPs. This function is commonly used between teacher and student APPs, the teacher sends messages to the student and the student can receive offline push notifications.
Prerequisites
- Before implementing cross-application offline push interoperability, please make sure both projects have integrated ZIM SDK and ZPNs SDK and have implemented offline push, please refer to Implement offline push notification for details.
Usage Steps
- Refer to FCM integration guide to obtain 2 Offline Push certificates for each of the 2 projects.
- Refer to How to configure Offline Push Certificates to configure the 2 push certificates obtained above on the ZEGOCLOUD console.
- Call the
setPushConfig
interface and fill in the corresponding configured appType for the current project.
Warning
This step needs to be completed before calling the registerPush interface to register the vendor for offline push.
Untitled
ZPNsConfig zpnsConfig = new ZPNsConfig();
// appType is the Certificate index.
// If the Certificate index is index1, then it should be appType(1).
zpnsConfig.setAppType(1);
ZPNsManager.setPushConfig(zpnsConfig);
1
After completing the above configuration, cross-application offline push interoperability can be implemented.