showBlockingAd

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

PLEASE NOTE The behavior of this function has changed from previous versions to have a 5 second delay before the close button on Nimbus ads. If you would like to retain the previous behavior, use the 4 parameter version of this function with a delay of 0.

This call will immediately render the ad into a dialog attached to the activity passed into this method upon a successful response.

Parameters

request

a nimbus request

activity

the activity hosting the blocking (fullscreen) ad

listener

the listener for receiving the response from Nimbus and AdController or an error if one occurs


fun showBlockingAd(request: NimbusRequest, @IntRange(from = 0, to = 3600) closeButtonDelaySeconds: Int = 5, activity: Activity, listener: NimbusAdManager.Listener)

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

This call will immediately render the ad into a dialog attached to the activity passed into this method upon a successful response.

The close button delay will prevent the close button from being show for the specified number of seconds.

Parameters

request

a nimbus request

closeButtonDelaySeconds

delay in seconds before the blocking ad is dismissible; defaults to 5 seconds

activity

the activity hosting the blocking (fullscreen) ad

listener

the listener for receiving the response from Nimbus and AdController or an error if one occurs