-
- All Implemented Interfaces:
-
com.vungle.ads.BaseAdListener,com.vungle.ads.NativeAdListener,io.cloudx.sdk.CloudXDestroyable
@VisibleForTesting() public final class VungleNativeAdapter extends CloudXNativeAdAdapter implements NativeAdListener
Vungle native ad adapter.
Constructs a NativeAd tied to the configured placement, hands the bid markup to Vungle, and forwards Vungle's NativeAdListener callbacks into the SDK's CloudXNativeAdAdapterListener. On load success, the loaded ad is wrapped in a VungleCloudXNativeAd for downstream rendering by either the built-in
NativeBannerBridgeor a publisher-owned native view.Threading: the Vungle SDK does not document a main-thread guarantee for its native callbacks. This adapter forwards callbacks on the thread Vungle uses; downstream bridges that touch the view hierarchy are responsible for marshalling to the main thread.
-
-
Constructor Summary
Constructors Constructor Description VungleNativeAdapter(Context context, Bundle serverExtras, String adm, CloudXNativeAdAdapterListener listener, CloudXLogger logger)
-
Method Summary
Modifier and Type Method Description Unitload(CloudXAdapterLoadParams params)Unitdestroy()UnitonAdLoaded(BaseAd baseAd)UnitonAdFailedToLoad(BaseAd baseAd, VungleError adError)UnitonAdFailedToPlay(BaseAd baseAd, VungleError adError)UnitonAdImpression(BaseAd baseAd)UnitonAdClicked(BaseAd baseAd)UnitonAdStart(BaseAd baseAd)UnitonAdEnd(BaseAd baseAd)UnitonAdLeftApplication(BaseAd baseAd)-
-
Method Detail
-
onAdLoaded
Unit onAdLoaded(BaseAd baseAd)
-
onAdFailedToLoad
Unit onAdFailedToLoad(BaseAd baseAd, VungleError adError)
-
onAdFailedToPlay
Unit onAdFailedToPlay(BaseAd baseAd, VungleError adError)
-
onAdImpression
Unit onAdImpression(BaseAd baseAd)
-
onAdClicked
Unit onAdClicked(BaseAd baseAd)
-
onAdLeftApplication
Unit onAdLeftApplication(BaseAd baseAd)
-
-
-
-