MediationUtils

class MediationUtils


Utility methods for mediation adapters.

Summary

Constants

const Double
const Double

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.

Constants

MIN_HEIGHT_RATIO

protected const val MIN_HEIGHT_RATIO = 0.7: Double

MIN_WIDTH_RATIO

protected const val MIN_WIDTH_RATIO = 0.5: Double

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.