Nimbus Android SDK

//sdk/com.adsbynimbus/NimbusAdManager/showAd

showAd

fun showAd(request: NimbusRequest, viewGroup: ViewGroup, listener: NimbusAdManager.Listener)

Makes a request to Nimbus and renders the result into an AdController.

This call will immediately render the ad into the ViewGroup passed into this method as the last child of that container upon a successful response.

Parameters

androidJvm

request a nimbus request
viewGroup the container that the ad view will attach to
listener the listener for the result or error of the request

fun showAd(request: NimbusRequest, @IntRange(from = 20)refreshInterval: Int, viewGroup: ViewGroup, listener: NimbusAdManager.Listener)

Makes a request to Nimbus and renders the result into an AdController.

The first call to this function will immediately return an AdController to onAdRendered(). If an ad fails to load or there is no bid, an error notification will be posted to onAdError() and will refresh after the refresh interval has elapsed. Upon receiving a successful bid, the onAdResponse() callback will be triggered at which point the ViewGroup must be visible to the user for the ad to render.

Parameters

androidJvm

request a nimbus request
viewGroup the container that the ad view will attach to
refreshInterval the refresh interval of the ad unit in seconds;
listener the listener for the result or error of the request