The configurable range is 15 to 300 seconds, and setting it to -1 disables the refresh.
banner.setRefreshTime( 60 ); // default 60 sec
Banner network schedule timeout setting
When loading banner ads, a timeout is set for each network (mediation partner). If an ad is not received within the specified time, it moves on to the next network.
You can fill the empty space in the view where the banner ad appears with an optimized background color that matches the ad.
banner.setAutoBgColor( true ); // default true
Banner request
The load() API is called at the desired point when the banner should appear on the screen. Once the loading is complete, the onLoaded() event is triggered, and the banner will automatically appear on the screen.
banner.load();
Excessive calls to the load() API will result in a block.
Banner interruption
This is called when you want to stop the banner ad. Typically, it is called when the activity or fragment displaying the banner is destroyed.
banner.stop();
Calling stop() when entering the onPause state may lead to missing click report data. Therefore, it is recommended to call it when the activity or fragment containing the banner view is destroyed.
Banner visibility status
Unlike other ad types, banners are automatically displayed on the screen once they are loaded. Therefore, you can use the following API to determine whether the banner is visible or not.
banner.isLoaded();
Banner event listener
Set up listeners for events that occur when loading a banner. The provided listeners and implementation examples are as follows:
In the onPause / onResume of the Activity or Fragment where the banner ad is displayed, you should call the banner's onPause / onResume. If onPause / onResume is not handled correctly, there may be missing report data when using third-party mediation. Therefore, it is recommended to implement it as shown below.