Notifications Guide v1
Notifications
Version 1

Push notifications

Copy link

This guide explains how to handle a push notification for each view on both Android and iOS devices.

When receiving the payload of the push notification sent to the notification channel, the channel_type object can have the following values: messaging, group_messaging, notification_chat, and notification_feed. When the channel_type value is set to notification_chat, the push notification needs to be displayed in Chat view. When the value is set to notification_feed, the push notification needs to be displayed in Feed view.

See the guide below on how to handle push notifications so that users can access their view of the notification channel upon tapping the push notification.

Note: The guides below show how to create view controllers for Feed view and Chat view. But you need to implement how to display each view controller depending on the layout of your app.


Prerequisite for iOS

Copy link

To use delivery receipt in notification channels, Notification Service Extension should be implemented in advance to receive the content of your remote notifications before they are displayed on the users' mobile devices, allowing the SDK to update the notification payload.

Note: The following prerequisites are required only for iOS, not Android.

Requirements

Copy link

To implement Notification Service Extension to the iOS client app, create an App Group to combine your app and extension.

  • Your app is developed with iOS 11.0 or later.
  • A remote notification is implemented and configured to display an alert.
  • The payload received from the remote notification includes the mutable-content key with the value set to 1.

Note: To enable mutable-content, go to the Settings > Application > Notifications > Push notification credentials on your dashboard. To learn more about the implementation and settings of Notification Service Extension, see the delivery receipt page in Chat SDK.


Feed view

Copy link

For both Android and iOS client apps, when receiving a push notification, you can find the FEED_CHANNEL_URL in the push notification payload. With the channel URL of the feed notification channel, you can create a view controller. Refer to the Channel rendering for iOS and Channel rendering for Android guide.


Chat view

Copy link

For both Android and iOS client apps, when receiving a push notification, you can find the CHAT_NOTIFICATION_CHANNEL_URL in the push notification payload. With the channel URL of the chat notification channel, you can create a view controller. Refer to the Channel rendering for iOS and Channel rendering for Android guide.