cometchat / cometchat-sample-app-react-native

Voice & Video Calling and Text Chat App for React Native
https://www.cometchat.com
Other
332 stars 166 forks source link

[Q] Can this works with OneSignal notification? #54

Closed anniewey closed 2 years ago

anniewey commented 2 years ago

Hi, I've run this sample app and can get the basic chatting features working.

However, I have concern on the push notification part as I'm using OneSignal to handle my app's notification due to support for Huawei users. I'm looking for a RTM & VOIP call library to be integrated in my app, hence trying out this library.

As I'm aware, this library is using Firebase to handle its notification. So how do I handle using my own push services? Or if i use Firebase, can it support Huawei devices? Not sure if I can install both push services without conflict.

prathamesh-cometchat commented 2 years ago

Since Huawei has removed Google Play Services from their devices, the Firebase Cloud Messaging (FCM) won't work. You can make use of our Webhooks feature to build a custom solution using OneSignal or any other provider of your choice.

Here are the steps for enabling and using CometChat Webhooks interface:

  1. Log in to CometChat Pro dashboard.
  2. Select an app of your choice.
  3. In the Left side navigation pane, select Webhooks.
  4. Click on Add Webhook
  5. Enter the following details: a. A unique ID for your Webhook. b. The webhook URL that will be called c. Select the trigger as after_message d. Enable the webhook e. You can optionally add security using Basic Auth.

This way, your webhook URL will be triggered every time a message is sent by any user of your app. You can then have your custom implementation to process the message and send a Push notification using OneSignal.