Class AdViewUtils

java.lang.Object
org.prebid.mobile.addendum.AdViewUtils

public final class AdViewUtils extends Object
  • Method Details

    • findPrebidCreativeSize

      public static void findPrebidCreativeSize(android.view.View adView, AdViewUtils.PbFindSizeListener handler)
    • findPrebidCreativeSize

      public static void findPrebidCreativeSize(android.view.View adView, AdViewUtils.PbFindSizeListener handler, AdViewUtils.PbScaleAppliedListener scaleListener)
      Behaves like findPrebidCreativeSize(View, PbFindSizeListener) and additionally notifies scaleListener after the corrective WebView initial-scale (see fixZoomIn(android.webkit.WebView, int, int)) has been applied.

      Delivery of scaleListener is best-effort: it is invoked at most once, and only when a corrective scale is actually applied. It is NOT invoked when no scale is applied (for example when the WebView is not yet sized, or its content height never resolves) nor on the failure path. Callers must not treat it as a guaranteed completion signal; if they gate UI on it they should pair it with their own fallback (such as a timeout). Passing null is equivalent to findPrebidCreativeSize(View, PbFindSizeListener).

    • findCacheId

      public static void findCacheId(android.webkit.WebView webView, AdViewUtils.CacheIdResult onResult)
    • findNative

      public static void findNative(Object object, PrebidNativeAdListener listener)
      This API can be used to find if the passed object contains info to retreive valid cached Native response or not, and notifies using the PrebidNativeAdListener
      Parameters:
      object - instances of Google Native Ads
      listener - to notify the validity of passed object via @onPrebidNativeLoaded, #onPrebidNativeNotFound, #onPrebidNativeNotValid