Cross-application offline push
Note
This file is compatible with iOS and Android.
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 the Android Vendor Push Integration Guide (Google,Apple) to obtain 2 Offline Push certificates for each of the 2 projects for each vendor.
- Refer to How to configure Offline Push Certificates to configure the 2 push certificates obtained above on the ZEGOCLOUD console.
Apple | |
---|---|
- 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 = ZPNsConfig();
// appType is the Certificate index.
// If the Certificate index is index1, then it should be appType = 1.
zpnsConfig.appType = 1;
ZPNs.setPushConfig(zpnsConfig);
1
After completing the above configuration, cross-application offline push interoperability can be implemented.