To determine whether an advertisement banner is currently being displayed or not you can use function, that returns a boolean value, specifically true if an ad is present and visible on the screen, and false otherwise:
banner.isAdDisplayed()
banner.isAdDisplayed()
To check whether the SDK is initialized and if the banner is ready for display or not you can use function, that returns a boolean value (true if the conditions are met and false otherwise).
banner.isReadyToRefresh()
banner.isReadyToRefresh()
Stopping and Starting Auto-Refresh
There may be cases when you would like to stop auto-refresh, for instance, when you hide a banner ad or want to manually refresh.
Stop auto-refresh for a banner ad with the following code:
banner.stopAutorefresh()
banner.stopAutorefresh()
Start auto-refresh for a banner ad with the following code:
banner.startAutorefresh(30.0)
banner.startAutorefresh(30.0)
Manually refresh the contents with the following code. You must stop auto-refresh prior to calling refreshAd.
banner.refreshAd()
banner.refreshAd()
Destroying Banners
Once you're finished with a banner ad, it's essential to clean up its resources by invoking the destroy() method. Neglecting this step could lead to a deterioration in your app's performance