-
Notifications
You must be signed in to change notification settings - Fork 4
App Return Ad
⚡ 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.
If you want to enable the Return Ads, simply invoke the following method.
manager.SetAppReturnAdsEnabled(true);
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.
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()
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?
- Try another ad format:
- Please see the Privacy page to learn how to ensure that your application complies with privacy regulations.
- Project Setup
- Configuring SDK
- Include Android
- Include iOS
- Additional mediation steps
- App-ads.txt🔗