public interface NativeAdProvider

Optional capability interface implemented by an AdProvider that supports native ads. The base AdProvider does not require native ad support, so a provider opts in by additionally implementing this interface; NativeAdLoader checks for it at runtime.

Methods

public abstract void loadNativeAd(String adUnitId, AdRequest request, AdCallback<NativeAd> onSuccess, AdCallback<AdError> onError)Loads a native ad.

Method details

loadNativeAd

public abstract void loadNativeAd(String adUnitId, AdRequest request, AdCallback<NativeAd> onSuccess, AdCallback<AdError> onError)
Loads a native ad. Exactly one of the callbacks is invoked.

Parameters

adUnitId String
the ad unit identifier from the network console
request AdRequest
optional targeting metadata, may be null
onSuccess AdCallback<NativeAd>
invoked with the loaded native ad
onError AdCallback<AdError>
invoked when loading fails