Class DynamicAppOpenAd

java.lang.Object
com.pranavpandey.android.dynamic.ads.DynamicBaseAd
com.pranavpandey.android.dynamic.ads.factory.DynamicAppOpenAd
All Implemented Interfaces:
DynamicAd

public class DynamicAppOpenAd extends DynamicBaseAd
A DynamicBaseAd to show a AppOpenAd dynamically throughout the app.
  • Constructor Details

    • DynamicAppOpenAd

      public DynamicAppOpenAd(@NonNull String adUnitId, @NonNull AppOpenAdListener dynamicAdListener)
      Constructor to initialize an object of this class.
      Parameters:
      adUnitId - The ad unit id to be used.
      dynamicAdListener - The app open ad listener to be used.
  • Method Details

    • getAdUnitId

      @NonNull public String getAdUnitId()
      Description copied from interface: DynamicAd
      Returns the unit id for this ad.
      Returns:
      The unit id for this ad.
    • getAdLayoutRes

      @LayoutRes public int getAdLayoutRes()
      Description copied from interface: DynamicAd
      Returns the optional layout resource for this ad.
      Returns:
      The optional layout resource for this ad.
    • getAdListener

      @NonNull public AppOpenAdListener getAdListener()
      Description copied from interface: DynamicAd
      Returns the listener used by this ad.
      Returns:
      The listener used by this ad.
    • onInitialize

      public void onInitialize()
      Description copied from interface: DynamicAd
      This method will be called to do the initialization.
    • getConsentInformation

      @Nullable public com.google.android.ump.ConsentInformation getConsentInformation()
      Description copied from interface: DynamicAd
      Returns the consent information if available.
      Returns:
      The consent information if available.
    • getConsentForm

      @Nullable public com.google.android.ump.ConsentForm getConsentForm()
      Description copied from interface: DynamicAd
      Returns the consent form if available.
      Returns:
      The consent form if available.
    • 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: DynamicAd
      Try to create the new ad.
    • isAdLoaded

      public boolean isAdLoaded()
      Description copied from interface: DynamicAd
      Checks whether the ad has been loaded.
      Returns:
      true if the ad has been loaded.
    • populateAd

      public void populateAd()
      Description copied from interface: DynamicAd
      Try to populate the new ad.
      Specified by:
      populateAd in interface DynamicAd
      Overrides:
      populateAd in class DynamicBaseAd
    • onAdResume

      public void onAdResume()
      Description copied from interface: DynamicAd
      Try to resume the paused ad.
    • onAdPause

      public void onAdPause()
      Description copied from interface: DynamicAd
      Try to pause the running ad.
    • onAdDestroy

      public void onAdDestroy()
      Description copied from interface: DynamicAd
      Try to destroy the ad instances and do cleanup.
      Specified by:
      onAdDestroy in interface DynamicAd
      Overrides:
      onAdDestroy in class DynamicBaseAd