Managing Notifications

Manage in-app and push notifications for replies in KMP.

In-app notifications

Enable or disable in-app notifications when a new reply arrives:

Kotlin
RepliesKmp.setInAppNotificationsEnabled(true)

In-app notification sound (Android)

On Android, enable or disable sound for in-app reply notifications:

Kotlin
RepliesKmp.setInAppNotificationSound(true)

No-op on iOS.

Push notifications (Android)

Registration token

Set the FCM token so the backend can send push notifications for new replies:

Kotlin
RepliesKmp.setPushNotificationRegistrationToken(fcmToken)

Showing a notification from payload

When you receive a push payload for a reply, pass it to the SDK to show the notification:

Kotlin
RepliesKmp.showNotification(data)  // data: Map<String, String>

Notification icon and channel

Kotlin
RepliesKmp.setNotificationIcon(R.drawable.ic_notification)
RepliesKmp.setPushNotificationChannelId("luciq_replies")
RepliesKmp.setSystemReplyNotificationSoundEnabled(true)

All of the above are Android-only; they are no-ops on iOS.

Last updated