NotificationController

Controller in charge of push notifications.

Properties

Link copied to clipboard
abstract val channelId: String

iAdvize push notifications channel id. Use this id to group the iAdvize Push Notifications in a dedicated channel, doing so will ensure you can clear them all without affecting your own client app push notifications, and thus allow to clear them using the clearIAdvizePushNotification() API.

Functions

Link copied to clipboard
@RequiresApi(value = 26)
abstract fun clearIAdvizePushNotifications(context: Context)

Clears the iAdvize Push Notifications from the dedicated notification channel. This is done automatically on Chatbox opening but you can call this API manually anytime.

Link copied to clipboard
@RequiresApi(value = 26)
abstract fun createNotificationChannel(context: Context)

Creates the iAdvize push notifications channel. Use this dedicated channel to group the iAdvize Push Notifications, doing so will ensure you can clear them all without affecting your own client app push notifications, and thus allow to clear them using the clearIAdvizePushNotification() API.

Link copied to clipboard
abstract fun disablePushNotifications(listener: IAdvizeSDK.Callback? = null)

Disable push notifications for the current user on this device.

Link copied to clipboard
abstract fun enablePushNotifications(listener: IAdvizeSDK.Callback? = null)

Enable push notifications for the current user on this device.

Link copied to clipboard

Analyze the given notification to check if it's a push notification coming from the iAdvize Conversation SDK. If yes it returns true, otherwise false.

Link copied to clipboard
abstract fun registerPushToken(pushToken: String)

Register the push token of your user device so it will receive push notifications for new messages received during a chat conversation.