Class DynamicBaseAd
java.lang.Object
com.pranavpandey.android.dynamic.ads.DynamicBaseAd
- All Implemented Interfaces:
DynamicAd
- Direct Known Subclasses:
DynamicAppOpenAd,DynamicBannerAd,DynamicInterstitialAd,DynamicNativeAd,DynamicRewardedAd,DynamicRewardedInterstitialAd
An abstract class to implement a
DynamicAd.-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.android.gms.ads.AdRequestThis method will be called to build the ad request for this ad.com.google.android.gms.ads.RequestConfigurationThis method will be called to get the ad request configurations.booleanChecks if any constraints should be matched before loading the ad.booleanReturns whether this ad is visible to the user.voidTry to destroy the ad instances and do cleanup.voidonCustomiseAd(boolean loaded) This method will be called to do the ad customisations.voidonPostAdLoaded(boolean loaded) This method will be called after the ad has been loaded.voidTry to populate the new ad.voidsetAdVisible(boolean adVisible) Sets whether this ad is visible to the user.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.pranavpandey.android.dynamic.ads.DynamicAd
getAdLayoutRes, getAdListener, getAdUnitId, getConsentForm, getConsentInformation, isAdLoaded, onAdCreate, onAdPause, onAdResume, onInitialize
-
Constructor Details
-
DynamicBaseAd
public DynamicBaseAd()
-
-
Method Details
-
getAdRequest
Description copied from interface:DynamicAdThis method will be called to build the ad request for this ad.- Specified by:
getAdRequestin interfaceDynamicAd- Returns:
- The ad request for this ad.
-
getAdRequestConfigurations
Description copied from interface:DynamicAdThis method will be called to get the ad request configurations.- Specified by:
getAdRequestConfigurationsin interfaceDynamicAd- Returns:
- The ad request configurations.
-
isAdAllowed
public boolean isAdAllowed()Description copied from interface:DynamicAdChecks if any constraints should be matched before loading the ad.- Specified by:
isAdAllowedin interfaceDynamicAd- Returns:
trueif the ad is allowed to be loaded.
-
onCustomiseAd
public void onCustomiseAd(boolean loaded) Description copied from interface:DynamicAdThis method will be called to do the ad customisations.- Specified by:
onCustomiseAdin interfaceDynamicAd- Parameters:
loaded-trueif the ad was already loaded and using the previous instance.
-
onPostAdLoaded
public void onPostAdLoaded(boolean loaded) Description copied from interface:DynamicAdThis method will be called after the ad has been loaded.- Specified by:
onPostAdLoadedin interfaceDynamicAd- Parameters:
loaded-trueif the ad was already loaded and using the previous instance.
-
populateAd
public void populateAd()Description copied from interface:DynamicAdTry to populate the new ad.- Specified by:
populateAdin interfaceDynamicAd
-
isAdVisible
public boolean isAdVisible()Description copied from interface:DynamicAdReturns whether this ad is visible to the user.- Specified by:
isAdVisiblein interfaceDynamicAd- Returns:
trueif this ad is visible to the user.
-
setAdVisible
public void setAdVisible(boolean adVisible) Sets whether this ad is visible to the user.- Parameters:
adVisible-trueif this add is visible to the user.
-
onAdDestroy
public void onAdDestroy()Description copied from interface:DynamicAdTry to destroy the ad instances and do cleanup.- Specified by:
onAdDestroyin interfaceDynamicAd
-