Package org.prebid.mobile.addendum
Class AdViewUtils
java.lang.Object
org.prebid.mobile.addendum.AdViewUtils
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic interfaceCallback used withfindPrebidCreativeSize(View, PbFindSizeListener, PbScaleAppliedListener). -
Method Summary
Modifier and TypeMethodDescriptionstatic voidfindCacheId(android.webkit.WebView webView, AdViewUtils.CacheIdResult onResult) static voidfindNative(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 thePrebidNativeAdListenerstatic voidfindPrebidCreativeSize(android.view.View adView, AdViewUtils.PbFindSizeListener handler) static voidfindPrebidCreativeSize(android.view.View adView, AdViewUtils.PbFindSizeListener handler, AdViewUtils.PbScaleAppliedListener scaleListener) Behaves likefindPrebidCreativeSize(View, PbFindSizeListener)and additionally notifiesscaleListenerafter the corrective WebView initial-scale (seefixZoomIn(android.webkit.WebView, int, int)) has been applied.
-
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 likefindPrebidCreativeSize(View, PbFindSizeListener)and additionally notifiesscaleListenerafter the corrective WebView initial-scale (seefixZoomIn(android.webkit.WebView, int, int)) has been applied.Delivery of
scaleListeneris 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). Passingnullis equivalent tofindPrebidCreativeSize(View, PbFindSizeListener). -
findCacheId
-
findNative
This API can be used to find if the passed object contains info to retreive valid cached Native response or not, and notifies using thePrebidNativeAdListener- Parameters:
object- instances of Google Native Adslistener- to notify the validity of passed object via @onPrebidNativeLoaded, #onPrebidNativeNotFound, #onPrebidNativeNotValid
-