parse-baidu-push-adapter
This package works seamlessly with parse-server to send push notification using GCM/FCM and Baidu to any android device and also supports APNS
Getting Started
npm install @parse-push/parse-baidu-push-adapter
Configure the parse-server to use Baidu push server by setting this config parameter
Along with these parameters below add pushServer : "baidu"
const PushAdapter = require('@parse/parse-baidu-push-adapter').default;
const pushOptions = {
ios: { /* iOS push options */ } ,
android: { /* android push options */ }
}
const pushServer = "baidu";
const options = {
appId: "****",
masterKey: "****",
push: {
adapter: new PushAdapter(pushOptions, pushServer)
},
/* ... */
}
const server = new ParseServer(options);
If you wish to use GCM/FCM then just remove the pushServer config that is all