Class AdUnit

  • All Implemented Interfaces:

    
    public abstract class AdUnit
    
                        

    Base ad unit for the original API.

    • Constructor Detail

      • AdUnit

        AdUnit(String configId)
    • Method Detail

      • resumeAutoRefresh

         void resumeAutoRefresh()

        Resumes auto refresh interval after stopping.

      • destroy

         void destroy()

        Destroy ad unit and stop downloading.

      • fetchDemand

         void fetchDemand(Object adObject, OnCompleteListener listener)

        Loads ad and applies keywords to the ad object.

        Parameters:
        adObject - AdMob's (AdManagerAdRequest or AdManagerAdRequest.Builder) or AppLovin's (MaxNativeAdLoader) ad object
        listener - callback when operation is completed (success or fail)
      • fetchDemand

         void fetchDemand(OnFetchDemandResult listener)

        Loads ad and saves it to cache.

        Parameters:
        listener - callback when operation is completed (success or fail)
      • activatePrebidImpressionTracker

         void activatePrebidImpressionTracker(View adView)

        Applies the native visibility tracker for tracking `burl` url.

        Parameters:
        adView - the ad view object (f.e.
      • setImpOrtbConfig

         void setImpOrtbConfig(String ortbConfig)

        Sets imp level OpenRTB config JSON string that will be merged with the original imp object in the bid request. Expected format: "{"new_field": "value"}".

        Parameters:
        ortbConfig - JSON config string.
      • setGlobalOrtbConfig

         void setGlobalOrtbConfig(String ortbConfig)

        Sets the global OpenRTB configuration string for the ad unit. It takes precedence over `TargetingParams.setGlobalOrtbConfig`. Expected format: "{"new_field": "value"}".

        Parameters:
        ortbConfig - The global OpenRTB JSON configuration string to set.