Chat / JavaScript
Chat JavaScript v4
Chat JavaScript
Chat
JavaScript
Home
/
Chat
/
JavaScript
This is the new Docs for Chat SDK v4 for JavaScript. To see the previous Docs, click here.

Overview

Using Chat SDK for JavaScript, you can send notification messages to your users in group channels using a hybrid mobile application. These notifications are delivered to users while their devices are idle or while the app is running in the background. You can also determine whether to display the content of the notifications while the client app is in the foreground.

Currently, only a hybrid mobile application with a React Native framework can handle push notifications with our Chat SDK. This section explains how to enable push notifications in your React Native app by using Firebase Cloud Messaging (FCM), Apple Push Notification service (APNs), and the Chat SDK.

While the Chat SDKs for iOS and Android automatically detect the state of your application, the Chat SDK for JavaScript doesn't. Therefore when the state changes, you should explicitly call the setForegroundState() or setBackgroundState() method.

Note: The Chat SDK doesn't support push notifications in web applications delivered through browsers like Chrome and Edge. But you can build your own notification system by using our webhook service to receive notifications for various events happening in your application.


Functionalities by topic

Users in group channels using hybrid mobile application can set their preferences in receiving notifications in their devices. The following is a list of features that our Chat SDK provides.

Configuring preferences

FunctionalityDescriptionOpen channelGroup channel

Set up push notifications

Sets up push notification messages using FCM and APNs.

Notification preferences

Turns push notifications on or off in the user's app by using registration token.

Push notification content templates

Displays customized push notification messages on a user’s device using templates.

Push notification translation

Receives notification messages translated into users' preferred languages.