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
adUnitIdString- the ad unit identifier from the network console
requestAdRequest- optional targeting metadata, may be null
onSuccessAdCallback<NativeAd>- invoked with the loaded native ad
onErrorAdCallback<AdError>- invoked when loading fails