The following sections show you how to load and then show and hide a banner or MREC ad.
Loading a Banner or MREC
The following code shows you how to load a banner or MREC by using your Ad Unit ID, desired position, and (for banners) desired background color.
MAX will size the ad for you automatically:
Adaptive banners are responsive banners with heights that derive from the device type and the width of the banner.
To disable adaptive banners, set the adaptive_banner flag, as in this example:
Call AppLovinMAX.get_adaptive_banner_height_for_width(«width») to get the banner height, and then adjust your content accordingly.
Stopping and Starting Auto-Refresh
You may want to stop auto-refresh for an ad.
This may be the case when you hide an ad or you want to manually refresh.
Stop auto-refresh with the following call:
Start auto-refresh for an ad with the following call: