Google is committed to advancing racial equity for Black communities. See how.

MediationUtils

public class MediationUtils extends Object

Utility methods for mediation adapters.

Constant Summary

double MIN_HEIGHT_RATIO
double MIN_WIDTH_RATIO

Public Constructor Summary

Public Method Summary

static AdSize
findClosestSize(Context context, AdSize original, List<AdSize> potentials)
Find the closest supported AdSize from the list of potentials to the provided size.

Inherited Method Summary

Constants

protected static final double MIN_HEIGHT_RATIO

Constant Value: 0.7

protected static final double MIN_WIDTH_RATIO

Constant Value: 0.5

Public Constructors

public MediationUtils ()

Public Methods

public static AdSize findClosestSize (Context context, AdSize original, List<AdSize> potentials)

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