Business Messaging Guide v2
Business Messaging
Version 2

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 for notifications, the channel_type object can have the following values: messaging, group_messaging, and notification_feed. When the value is set to notification_feed, the push notification needs to be displayed in the channel 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 the in-app notification channel 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 in-app 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. The extension will allow 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 CHANNEL_URL in the push notification payload. With the channel URL, you can create a view controller. Refer to the Channel rendering for iOS and Channel rendering for Android guide.