Overview

LAST EDIT Jan 20 2022

Stream Chat supports push notifications for Android, iOS and Huawei phones.

Support for Xiaomi is coming up soon, reach out to support if you want early access.

Push notifications are only sent for new messages and not for other events. You can use Webhooks to send push notifications on other types of events.

Setting up Push

Copied!

Push is available to Stream Chat integrations running in a mobile environment. Depending on which Stream Chat SDK you are using, the process for setting up push notifications will be slightly different. Follow the guide for your chosen SDK:

Push Delivery Rules

Copied!

Push message delivery behaves according to these rules:

  • Notifications are sent only for new messages.
  • Only channel members receive push messages.
  • Members receive push notifications regardless of their online status.
  • Replies inside a thread are only sent to users that are part of that thread (they posted at least one message or were mentioned).
  • Messages from muted users are not sent.
  • Messages are sent to all registered devices for a user (up to 25) .
  • Up to 100 members of a channel will receive push notifications.
  • skip_push is not marked as true, as described here.
  • push_notifications is enabled (default) on the channel type for message is sent.

Handling Push Notifications on the Foreground

Copied!

Both iOS and Android discard push notifications when your application is on the foreground.

You can configure this on your application and decide what to do when a push notification is received while the app is on the foreground.

Push Notification Payload

Copied!

Push notifications are delivered as data payloads that the SDK can use to convert into the same data types that are received when working with the APIs.

On both Android and iOS the SDK will convert the payload in channel and message types and allow you to customize the notification message.

You can find more examples and guides on how to customize push notifications on the specific SDK doc pages.

Make sure to read the "Legacy - Push Templates" page if your application was created before January 18, 2022 or was not upgraded to push v2.

Troubleshooting

Copied!

Push notifications are not always intuitive to implement because they involve systems outside of Stream Chat with a number of moving parts. We've put together some resources on common errors and how to resolve them.

Other Push Providers

Copied!

While Stream Chat doesn't have first class integration for Push providers besides Firebase APN and Huawei, it is entirely possible to integrate with additional providers using Webhooks.