Google FCM push notification implementation
Implementation steps
-
Copy the data of
firebaseConfig
to your project.var appID = 0; // Your Application ID of ZEGO ZIM ZIM.create({ appID: appID }); var zim = ZIM.getInstance(); var config = { // From firebaseConfig apiKey: '', authDomain: '', projectId: '', storageBucket: '', messagingSenderId: '', appId: '', measurementId: '', // From Web Push certificates vapidKey: '', } ZPNs.getInstance().register(config, zim);
-
Download the latest version of ZPNs SDK and copy the
firebase-messaging-sw.js
file to the project root directory. -
After the above configuration is completed, please contact ZEGOCLOUD Technical Support for offline push related configuration.