Class DynamicRewardedAd
java.lang.Object
com.pranavpandey.android.dynamic.ads.DynamicBaseAd
com.pranavpandey.android.dynamic.ads.factory.DynamicRewardedAd
- All Implemented Interfaces:
DynamicAd
A
DynamicBaseAd to show a RewardedAd 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
ConstructorsConstructorDescriptionDynamicRewardedAd(String adUnitId, RewardedAdListener 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.protected com.google.android.gms.ads.FullScreenContentCallbackReturns the optional full screen content callback.protected com.google.android.gms.ads.rewarded.ServerSideVerificationOptionsReturns the optional server side verification options.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.voidThis method will be called to do the initialization.voidonPostAdLoaded(boolean loaded) This method will be called after the ad has been loaded.voidTry to populate the new ad.Methods inherited from class com.pranavpandey.android.dynamic.ads.DynamicBaseAd
getAdRequest, getAdRequestConfigurations, isAdAllowed, isAdVisible, onCustomiseAd, 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.
-
getServerSideVerificationOptions
@Nullable protected com.google.android.gms.ads.rewarded.ServerSideVerificationOptions getServerSideVerificationOptions()Returns the optional server side verification options.- Returns:
- The optional server side verification options.
-
getFullScreenContentCallback
@Nullable protected com.google.android.gms.ads.FullScreenContentCallback getFullScreenContentCallback()Returns the optional full screen content callback.- Returns:
- The optional full screen content callback.
-
onAdCreate
public void onAdCreate()Description copied from interface:DynamicAdTry to create the new ad. -
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- Overrides:
onPostAdLoadedin 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
-