zego-zpns-react-native
v2.6.6
Published
Zego ZPNs SDK for React Native
Downloads
1,144
Maintainers
Readme
zego-zpns-react-native
Getting started
$ npm install zego-zpns-react-native --save
Mostly automatic installation
$ react-native link zego-zpns-react-native
Usage
import ZPNs from 'zego-zpns-react-native';
ZPNs.setPushConfig({ enableFCMPush: true });
ZPNs.enableDebug(true);
const zpns = ZPNs.getInstance();
zpns.on('registered', console.log);
zpns.on('notificationArrived', console.log);
zpns.on('notificationClicked', console.log);
zpns.on('throughMessageReceived', console.log);
zpns.applyNotificationPermission();
zpns.registerPush();