Unity In App

Learn how to handle in-app notifications in Unity.

In-App Notifications

In-app notifications are pop-ups that you can show to your users while they are in your application. They are useful for engaging users with messages, offers, or prompts without interrupting their experience.

In-App Notification Button onClick callback

To handle an In-App button click, add the following code snippet:

void CleverTapInAppNotificationButtonTapped(string message)
{
    Debug.Log("unity received inapp notification button clicked: " + (!String.IsNullOrEmpty(message) ? message : "NULL"));
}

In-App Notification Button on Dismissed callback

To handle the dismissed callback, use the following code:

void CleverTapInAppNotificationDismissedCallback(string message)
{
    Debug.Log("unity received inapp notification dismissed: " + (!String.IsNullOrEmpty(message) ? message : "NULL"));
}

In-App Notification Controls

Control how and when In-App notifications appear in your app.

Suspend In-App Notifications

Pause In-app notifications temporarily. Use this to stop notifications during specific app states.

CleverTap.SuspendInAppNotifications();

Discard In-App Notifications

Remove all pending In-App notifications permanently. Use this to clear irrelevant or outdated notifications.

CleverTap.DiscardInAppNotifications();

Resume In-App Notifications

Resume paused In-App notifications. Use this to show notifications again when appropriate.

CleverTap.ResumeInAppNotifications();