Global Settings - cleveradssolutions/CAS-Android GitHub Wiki
⚡ Before you start
Make sure you have correctly Initialize SDK.
The AdSettings
class provides global settings for the CAS SDK.
The enabled Debug Mode will display a lot of useful information for debugging about the states of the SDK with log tag CAS
.
Disabled by default. Disabling Debug Mode may improve application performance.
CAS.settings.setDebugMode(true);
Note
If you have discovered the problem in the work of the SDK, please provide us with a description of the problem along with the full log of your device.
Set the time interval during which users can enjoy an ad-free experience while retaining access to Rewarded Ads and App Open Ads formats. This interval is defined from the moment of the initial app installation, in seconds. Within this interval, users enjoy privileged access to the application's features without intrusive advertisements.
int secondsIn7Days = 604800;
CAS.settings.setTrialAdFreeInterval(secondsIn7Days);
Managing ad availability is not easy. Keeping a balance between maximum ad availability while minimizing waste (network calls - which may affect user experience and data usage - and calls to mediated networks APIs - which may negatively impact eCPM if their inventory never gets to be shown to a user) can turn out to be harder than expected. In fact, often, it is simply guess work as you cannot predict ahead of time when a user will reach a moment in your application or game where it makes sense to show an Interstitial or offer the possibility to watch a Rewarded ad.
When you try to time your ad requests, this often results in not having a fill when you need it or having wasted fills that are never shown.
The CAS SDK provides an “auto-request” feature to address this problem.
By default, CAS SDK starts with auto-request enabled for all managers.
This means two things:
- When a user finishes watching an ad, CAS immediately tries to replace that ad.
- When a certain placement has trouble obtaining a fill (no traditional mediated network has available inventory and no programmatic demand is bidding within a predetermined amount of time), CAS continues trying to ensure that placement gets a fill by restarting the entire ad request process. This is performed in exponentially increasing time intervals to optimize the chances of getting a fill while minimizing usage of device resources.
However, you can choose to disable auto-request when you set Manual
loading mode.
Mode | Load*1 | Impact on App performance | Memory usage | Actual ads*2 |
---|---|---|---|---|
FastestRequests | Auto | Very high | High | Most relevant |
FastRequests | Auto | High | Balance | High relevance |
Optimal (Default) | Auto | Balance | Balance | Balance |
HighPerformance | Auto | Low | Low | Possible loss |
HighestPerformance | Auto | Very low | Low | Possible loss |
Manual | Manual*3 | Very low | Low | Depends on the frequency |
CAS.settings.setLoadingMode(LoadingManagerMode.Optimal);
^1: Auto control load mediation ads starts immediately after initialization and will prepare displays automatically.
^2: Potential increase in revenue by increasing the frequency of ad requests. At the same time, it greatly affects the performance of the application.
^3: Manual control loading mediation ads requires manual preparation of advertising content for display. Use ad loading methods before trying to show: MediationManager.loadInterstitial(), MediationManager.loadRewardedVideo(), CASBannerView.loadNextAd()
.