discardPolicy

The default discard decision for this AdItem once an attempt to play it ended, for any AdItemAttemptOutcome, i.e. whether it is discarded or kept for a later opportunity. AdvertisingConfig.shouldDiscardAdItem receives it as AdItemDiscardContext.discardPolicyDecision and can override it.

Default value is AdItemDiscardPolicy.DiscardAfterAttempt.

Limitations

  • Only pause ads are supported for now, i.e. when position is "pause". Ignored for every other AdItem.

Example Usage

To keep a pause ad eligible for every later pause, instead of discarding it once it was presented:

AdItem(arrayOf(adSource), position = "pause", discardPolicy = AdItemDiscardPolicy.KeepAfterAttempt)