Created
February 12, 2017 09:36
-
-
Save ayltai/e4c75c672cee7371f44b61f91dd94499 to your computer and use it in GitHub Desktop.
Extending CustomNativeEvent class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void loadNativeAd(@NonNull final Context context, | |
@NonNull final CustomEventNative.CustomEventNativeListener customEventNativeListener, | |
@NonNull final Map<String, Object> localExtras, | |
@NonNull final Map<String, String> serverExtras) { | |
final String adUnitId = serverExtras.get(KEY_AD_UNIT_ID); | |
if (this.validateAdUnitId(adUnitId)) { | |
final FacebookNativeAd nativeAd = this.createNativeAd(context, customEventNativeListener, null, adUnitId); | |
this.onLoadNativeAd(nativeAd); | |
nativeAd.fetchAd(); | |
} else { | |
customEventNativeListener.onNativeAdFailed(NativeErrorCode.NATIVE_ADAPTER_CONFIGURATION_ERROR); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment