MediationUtils

class MediationUtils


Utility methods for mediation adapters.

Summary

Public constructors

Public functions

java-static AdSize?
findClosestSize(
    context: Context!,
    original: AdSize!,
    potentials: (Mutable)List<AdSize!>!
)

Finds the closest supported AdSize from the list of potentials to the provided size.

Public constructors

MediationUtils

MediationUtils()

Public functions

findClosestSize

java-static fun findClosestSize(
    context: Context!,
    original: AdSize!,
    potentials: (Mutable)List<AdSize!>!
): AdSize?

Finds the closest supported AdSize from the list of potentials to the provided size. Returns null if none are within given threshold size range.