Cordova In-App

In-App Notifications

In-App Notification Button onClick callback

To handle In-App Notification Button onClick callback, add the following code snippet:

document.addEventListener('onCleverTapInAppButtonClick', e => {
            log("onCleverTapInAppButtonClick")
            log(e.customExtras)
        }
    )

In-App Notification Button onDismissed callback

To handle onDismissed callback:

document.addEventListener('onCleverTapInAppNotificationDismissed', e => {
            log("onCleverTapInAppNotificationDismissed")
        }
    )

Control In-App Notifications

Suspend

Suspends and saves in-app notifications until resumeInAppNotifications method is called for the current session.

CleverTap.suspendInAppNotifications()

Discard

Suspends the display of in-app notifications and discards the display of any new in-app notification. It also discards in-app notifications until resumeInAppNotifications method is called for the current session.

CleverTap.discardInAppNotifications()

Resume

The resumeInAppNotifications method resumes displaying in-app notifications. If you call this method after the discardInAppNotifications() method, it resumes the in-app notifications for events raised after the call is performed.

However, if you call the resumeInAppNotifications method after the suspendInAppNotifications() method, then it displays all queued in-app notifications and also resumes in-app notifications for events raised after the call is performed.

CleverTap.resumeInAppNotifications()

Did this page help you?