I found a patchwork solution.
You will need to use the platfrom API and install the following two commands.
- plug cordova add phonegap-plugin-push -variable SENDER_ID = "xxxxxxxx" --save
- plug cordova add cordova-plugin-fcm
Before you start working on a project, you will need to follow steps 1 and 2 for Android and / or 1,2 and 3 for iOs .
Once everything is complete, you must place the following two files in the root directory of your project so that "www" is native to the files in terms of hierarchy.
- Google-services.json
- GoogleService-Info.plist
after compelete performs this step from phone-break-press . Ideally, you only need the following snippet to register a token.
const push = PushNotification.init({ android: { }, browser: { pushServiceURL: 'http://push.api.phonegap.com/v1/push' }, ios: { alert: "true", badge: "true", sound: "true" }, windows: {} }); push.on('registration', (data) => {
It is important to note that sendbird only sends push notifications when you are offline. Either iO or the Android documentation for push notifications emphasize these disclaimers very well.
By installing the push notification service in the application, users of your application can receive messages even offline. Typically, users can receive push notifications after their application goes into the background. The SendBird SDK automatically detects whether your application enters the background and updates the status of the userβs connection to the disconnected one. Therefore, in normal cases, you do not need to explicitly disconnect communications.
There you have an implementation of corodva / phonegap / javascript push notifications about Sendbird.
And no, I canβt tell you why Sendbird did not document this! If anyone has a more efficient way, I'm all ears.