Class DynamicNativeAd
java.lang.Object
com.pranavpandey.android.dynamic.ads.DynamicBaseAd
com.pranavpandey.android.dynamic.ads.factory.DynamicNativeAd
- All Implemented Interfaces:
DynamicAd
A
DynamicBaseAd to show a NativeAd dynamically throughout the app.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.pranavpandey.android.dynamic.ads.DynamicAd
DynamicAd.Default, DynamicAd.Key, DynamicAd.Value -
Field Summary
Fields inherited from interface com.pranavpandey.android.dynamic.ads.DynamicAd
CLASS_DYNAMIC_WIDGET, IABTCF_gdprApplies, IABTCF_PurposeConsents, IABTCF_PurposeLegitimateInterests, IABTCF_VendorConsents, IABTCF_VendorLegitimateInterests, LAYOUT_RES_NONE, PREFS -
Constructor Summary
ConstructorsConstructorDescriptionDynamicNativeAd(String adUnitId, int adLayoutRes, NativeAdListener dynamicAdListener) Constructor to initialize an object of this class.DynamicNativeAd(String adUnitId, NativeAdListener dynamicAdListener) Constructor to initialize an object of this class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the optional layout resource for this ad.Returns the listener used by this ad.Returns the unit id for this ad.com.google.android.ump.ConsentFormReturns the consent form if available.com.google.android.ump.ConsentInformationReturns the consent information if available.booleanChecks whether the ad has been loaded.voidTry to create the new ad.voidTry to destroy the ad instances and do cleanup.voidTry to pause the running ad.voidTry to resume the paused ad.voidonCustomiseAd(boolean loaded) This method will be called to do the ad customisations.voidThis method will be called to do the initialization.voidTry to populate the new ad.Methods inherited from class com.pranavpandey.android.dynamic.ads.DynamicBaseAd
getAdRequest, getAdRequestConfigurations, isAdAllowed, isAdVisible, onPostAdLoaded, setAdVisible
-
Constructor Details
-
Method Details
-
getAdUnitId
Description copied from interface:DynamicAdReturns the unit id for this ad.- Returns:
- The unit id for this ad.
-
getAdLayoutRes
Description copied from interface:DynamicAdReturns the optional layout resource for this ad.- Returns:
- The optional layout resource for this ad.
-
getAdListener
Description copied from interface:DynamicAdReturns the listener used by this ad.- Returns:
- The listener used by this ad.
-
onInitialize
public void onInitialize()Description copied from interface:DynamicAdThis method will be called to do the initialization. -
getConsentInformation
Description copied from interface:DynamicAdReturns the consent information if available.- Returns:
- The consent information if available.
-
getConsentForm
Description copied from interface:DynamicAdReturns the consent form if available.- Returns:
- The consent form if available.
-
onAdCreate
public void onAdCreate()Description copied from interface:DynamicAdTry to create the new ad. -
onCustomiseAd
public void onCustomiseAd(boolean loaded) Description copied from interface:DynamicAdThis method will be called to do the ad customisations.- Specified by:
onCustomiseAdin interfaceDynamicAd- Overrides:
onCustomiseAdin classDynamicBaseAd- Parameters:
loaded-trueif the ad was already loaded and using the previous instance.
-
isAdLoaded
public boolean isAdLoaded()Description copied from interface:DynamicAdChecks whether the ad has been loaded.- Returns:
trueif the ad has been loaded.
-
populateAd
public void populateAd()Description copied from interface:DynamicAdTry to populate the new ad.- Specified by:
populateAdin interfaceDynamicAd- Overrides:
populateAdin classDynamicBaseAd
-
onAdResume
public void onAdResume()Description copied from interface:DynamicAdTry to resume the paused ad. -
onAdPause
public void onAdPause()Description copied from interface:DynamicAdTry to pause the running ad. -
onAdDestroy
public void onAdDestroy()Description copied from interface:DynamicAdTry to destroy the ad instances and do cleanup.- Specified by:
onAdDestroyin interfaceDynamicAd- Overrides:
onAdDestroyin classDynamicBaseAd
-