ApsDemandProvider

object ApsDemandProvider : AsyncInterceptor

Please initialize APS using the APS SDK. For more information see the Nimbus APS Docs

/* Initialize APS SDK */
AdRegistration.getInstance("aps_app_key", applicationContext)

/* Set the MRAID Policy */
AdRegistration.setMRAIDSupportedVersions(arrayOf("1.0", "2.0", "3.0"))
AdRegistration.setMRAIDPolicy(MRAIDPolicy.CUSTOM)

/* Set Nimbus as the Mediator */
AdRegistration.setAdNetworkInfo(DTBAdNetworkInfo(DTBAdNetwork.NIMBUS));

/* Update APS to set Nimbus as the Viewability Partner */
AdRegistration.addCustomAttribute("omidPartnerName", Nimbus.sdkName)
AdRegistration.addCustomAttribute("omidPartnerVersion", Nimbus.version)

/* Optional: Enable APS logging / test mode to verify the integration */
AdRegistration.enableLogging(true);
AdRegistration.enableTesting(true);

Amazon APS request interceptor for injecting APS bids into a request to Nimbus.

Calling initialize on this object will install a request interceptor for all outbound requests to Nimbus. When a request to Nimbus is made, a request to APS for each matching DTBAdSize in the NimbusRequest will be made and any winning bids will be automatically injected into the NimbusRequest.

Properties

Link copied to clipboard

Adjusts the timeout for APS requests in milliseconds.

Link copied to clipboard

Current state of the ApsDemandProvider.

Functions

Link copied to clipboard
fun fetchApsParams(width: Int, height: Int, includeVideo: Boolean): String
Link copied to clipboard
suspend fun Collection<DTBAdSize>.fetchApsParamsAsync(): Set<ApsParams>
Link copied to clipboard
open suspend override fun interceptRequest(request: NimbusRequest): NimbusRequestChange?

Appends any matching APS bids to an outbound NimbusRequest.

Link copied to clipboard
open fun modifyRequest(request: NimbusRequest)
Link copied to clipboard
open fun onAdResponse(nimbusResponse: NimbusResponse)
Link copied to clipboard
open fun onError(error: NimbusError)