Skip to content

App Return Ad

d.eshenko edited this page Oct 18, 2022 · 12 revisions

⚡ Before you start
Make sure you have correctly Initialize SDK.

Implementation by UnityEditor | Script C#


The Return Ads which is displayed once the user returns to your application after a certain period of time.
To minimize the intrusiveness, short time periods are ignored.
Return ads are disabled by default.

Enable the ad

If you want to enable the Return Ads, simply invoke the following method.

manager.SetAppReturnAdsEnabled(true);

Ad events

To further customize the behavior of your ad, you can hook into a number of events in the ad's lifecycle: opening, closing, and so on. Listen for these events by registering a delegate for the appropriate event, as shown below.

// Executed when the ad is displayed.
manager.OnAppReturnAdShown += () => Debug.Log("App return ad shown");
// Executed when the ad is failed to display.
manager.OnAppReturnAdFailedToShow += (error) => Debug.LogError(error);
// Executed when the user clicks on an Ad.
manager.OnAppReturnAdClicked += () => Debug.Log("App return ad clicked");
// Executed when the ad is closed.
manager.OnAppReturnAdClosed += () => Debug.Log("App return ad closed");

⚠️ Callbacks from CleverAdsSolutions are not guaranteed to be called on Unity thread. Read more about Execute events on Unity Thread.

Skip next return

You can call this method when you intentionally redirect the user to another application (for example Google Play) and do not want them to see ads when they return to your application.

manager.SkipNextAppReturnAds()

Disable the ad

When you no longer want to show ads to users after they return to the app, invoke the following method.

manager.SetAppReturnAdsEnabled(false);

What’s Next?

Clone this wiki locally