Interface MediationNativeAdAdapter.MediationNativeAdListener
-
- All Implemented Interfaces:
public interface MediationNativeAdAdapter.MediationNativeAdListener
-
-
Method Summary
Modifier and Type Method Description abstract voidcloseIfAutomaticallyDisabled(@NonNull() MediationNativeAdAdapter adapter)Calls if MediationNativeAdListener.shouldCloseAutomatically returned false. abstract voidonAdChoicesIconLoad(@Nullable() ImageData imageData, boolean success, @NonNull() MediationNativeAdAdapter adapter)Need to call when adChoices icon loaded successfully abstract voidonClick(@NonNull() MediationNativeAdAdapter adapter)Must be called when ad view received click. abstract voidonCloseAutomatically(@NonNull() MediationNativeAdAdapter adapter)Calls if MediationNativeAdListener.shouldCloseAutomatically returned true. abstract voidonLoad(@NonNull() NativePromoBanner banner, @NonNull() MediationNativeAdAdapter adapter)Must be called when implemented ads network loads successfully inside MediationNativeAdAdapter.load(MediationNativeAdConfig, MediationNativeAdListener, Context) method. abstract voidonNoAd(@NonNull() IAdLoadingError adLoadingError, @NonNull() MediationNativeAdAdapter adapter)Must be called when implemented ads failed to load for some reason inside MediationNativeAdAdapter.load(MediationNativeAdConfig, MediationNativeAdListener, Context) method. abstract voidonShow(@NonNull() MediationNativeAdAdapter adapter)Must be called when ad view showing / impression must be tracked. abstract voidonVideoComplete(@NonNull() MediationNativeAdAdapter adapter)If current ad contains video element, must be called when video completed playing abstract voidonVideoPause(@NonNull() MediationNativeAdAdapter adapter)If current ad contains video element, must be called when video paused abstract voidonVideoPlay(@NonNull() MediationNativeAdAdapter adapter)If current ad contains video element, must be called when video starts playing abstract booleanshouldCloseAutomatically()Determines what SDK should do when selecting particular adchoices option. -
-
Method Detail
-
closeIfAutomaticallyDisabled
abstract void closeIfAutomaticallyDisabled(@NonNull() MediationNativeAdAdapter adapter)
Calls if MediationNativeAdListener.shouldCloseAutomatically returned false.
- Parameters:
adapter- Adapter whom ad have to be hidden.
-
onAdChoicesIconLoad
abstract void onAdChoicesIconLoad(@Nullable() ImageData imageData, boolean success, @NonNull() MediationNativeAdAdapter adapter)
Need to call when adChoices icon loaded successfully
- Parameters:
imageData- is current instancesuccess- is download statusadapter- an instance of current adapter
-
onClick
abstract void onClick(@NonNull() MediationNativeAdAdapter adapter)
Must be called when ad view received click. Most of ad networks provide callbacks for this, so pass it here
- Parameters:
adapter- an instance of current adapter
-
onCloseAutomatically
abstract void onCloseAutomatically(@NonNull() MediationNativeAdAdapter adapter)
Calls if MediationNativeAdListener.shouldCloseAutomatically returned true.
- Parameters:
adapter- Adapter whom ad was closed automatically.
-
onLoad
abstract void onLoad(@NonNull() NativePromoBanner banner, @NonNull() MediationNativeAdAdapter adapter)
Must be called when implemented ads network loads successfully inside MediationNativeAdAdapter.load(MediationNativeAdConfig, MediationNativeAdListener, Context) method.
- Parameters:
banner- banner should be created from assets, received from ad network.adapter- an instance of current adapter
-
onNoAd
abstract void onNoAd(@NonNull() IAdLoadingError adLoadingError, @NonNull() MediationNativeAdAdapter adapter)
Must be called when implemented ads failed to load for some reason inside MediationNativeAdAdapter.load(MediationNativeAdConfig, MediationNativeAdListener, Context) method.
- Parameters:
adLoadingError- a reason of fail to loadadapter- an instance of current adapter
-
onShow
abstract void onShow(@NonNull() MediationNativeAdAdapter adapter)
Must be called when ad view showing / impression must be tracked. Most of ad networks provide callbacks for this, so pass it here
- Parameters:
adapter- an instance of current adapter
-
onVideoComplete
abstract void onVideoComplete(@NonNull() MediationNativeAdAdapter adapter)
If current ad contains video element, must be called when video completed playing
- Parameters:
adapter- an instance of current adapter
-
onVideoPause
abstract void onVideoPause(@NonNull() MediationNativeAdAdapter adapter)
If current ad contains video element, must be called when video paused
- Parameters:
adapter- an instance of current adapter
-
onVideoPlay
abstract void onVideoPlay(@NonNull() MediationNativeAdAdapter adapter)
If current ad contains video element, must be called when video starts playing
- Parameters:
adapter- an instance of current adapter
-
shouldCloseAutomatically
abstract boolean shouldCloseAutomatically()
Determines what SDK should do when selecting particular adchoices option.
- Returns:
Boolean value which specifies should be ad closed or not.
-
-
-
-