CometChat Push Notification Sample App is a fully functional push notification app capable of one-on-one (private) and group messaging, and Calling. This sample app enables users to send and receive push notifications for text and multimedia messages like images, videos, documents and Custom Messages. Also, users can make push notifications for Audio and Video calls to other users or groups.
- Login to the CometChat Dashboard.
- Select an existing app or create a new one.
- Go to "API & Auth Keys" section and copy the
REST API
key from the "REST API Keys" tab. - Go to the "Extensions" section and Enable the Push Notifications extension.
- Go to the "Installed" tab in the same section and open the settings for this extension and Set the version to
V2
. - Paste the
REST API Key
in the Settings. - Go to Firebase Console and get the Server Key for your app. Paste the Server Key in the settings and click on save.
- Copy your app's
APP_ID
,REGION
andAUTH_KEY
from the Dashboard. These will be required in the next steps.
To Run the sample push notifications app, do the following changes:
You can Obtain your google-services.json from Firebase Console
-
Open the project in Android Studio.
-
Add
google-services.json
in app directory -
Build and run the Sample App
react-native run-android
.
To Run the sample push notifications app, do the following changes:
For FCM you can obtain your GoogleServices.plist from Firebase Console
-
Open the project in Xcode and navigate to select your push notification configuration:
- APNS + Callkit (Recommended)
- Firebase
-
Create certificates for your bundle ID as mentioned in our documentation.
-
Build and run the Sample App
react-native run-ios
.
- CometChat provides two ways to implement push notifications for your IOS app.
For issues running the project or integrating with our UI Kits, consult our documentation or create a support ticket or seek real-time support via the CometChat Dashboard.