Class BaseInterstitialAd

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void destroy() Close, destroy the ad and free resources
      void dismiss() Close screen with ad
      String getAdSource() Get the name of source network.
      float getAdSourcePriority() Ad Source Priority is the value representing current ad network place in the queue of received advertisements.
      double getCloseDelay() Gets the time until the ad can be closed in seconds
      int getVideoQuality() Gets desired video quality of loading video.
      boolean isMediationEnabled() Get enable/disable mediation flag
      boolean isUseExoPlayer() Gets current flag of using ExoPlayer (androidx.
      final void load() Start loading ads.
      void loadFromBid(@NonNull() String bidId) Start loading ad with the bidding ID
      void setMediationEnabled(boolean mediationEnabled) Enables/disables mediation for current ad.
      void setStatListener(@Nullable() BaseInterstitialAd.InterstitialAdStatListener statListener) Set statistics listener of an advertisement Must be called before InterstitialAd.load()
      void setVideoQuality(int videoQuality) Desired video quality can be set.
      void show() Show screen with ad
      void show(@Nullable() Context ctx)
      void useExoPlayer(boolean useExoPlayer) Enables/disables ExoPlayer (androidx.media's ExoPlayer) to play video.
      • Methods inherited from class com.my.target.common.BaseAd

        getCustomParams, getTag, getWebFormClient, setAdNetworkConfig, setTag, setWebFormClient
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • destroy

         void destroy()

        Close, destroy the ad and free resources

      • dismiss

         void dismiss()

        Close screen with ad

      • getAdSource

        @Nullable() String getAdSource()

        Get the name of source network. It always will be "myTarget" if no mediation enabled. returns null if ad is not loaded

        Returns:

        ad source

      • getAdSourcePriority

         float getAdSourcePriority()

        Ad Source Priority is the value representing current ad network place in the queue of received advertisements. Works only with mediation. 0f if not loaded yet.

        Returns:

        priority of ad source network

      • getCloseDelay

         double getCloseDelay()

        Gets the time until the ad can be closed in seconds

        Returns:

        close delay

      • getVideoQuality

         int getVideoQuality()

        Gets desired video quality of loading video. In vertical pixels.

        Returns:

        video quality

      • isMediationEnabled

         boolean isMediationEnabled()

        Get enable/disable mediation flag

        Returns:

        flag

      • isUseExoPlayer

         boolean isUseExoPlayer()

        Gets current flag of using ExoPlayer (androidx.media's ExoPlayer) for video playing

        Returns:

        param of using ExoPlayer

      • load

         final void load()

        Start loading ads. In case of successful loading, the onLoad method will be called on the object passed as a listener, in case of loading error or if there is no advertisement to be shown - the onNoAd Listener must be added before loading

      • loadFromBid

         void loadFromBid(@NonNull() String bidId)

        Start loading ad with the bidding ID

        Parameters:
        bidId - bidding ID
      • setMediationEnabled

         void setMediationEnabled(boolean mediationEnabled)

        Enables/disables mediation for current ad. Default is true. Disabling this option may cause lower fill-rate

        Parameters:
        mediationEnabled - if true - enable mediation, otherwise not
      • setVideoQuality

         void setVideoQuality(int videoQuality)

        Desired video quality can be set. In vertical pixels. For example, if called setVideoQuality(360) SDK will try to show video with nearest size, so if ad has ad video with 480x800 and 1920x1080 sizes, 480x800 will be used. Default is 360

        Parameters:
        videoQuality - desired quality in vertical pixels
      • show

         void show()

        Show screen with ad

      • show

         void show(@Nullable() Context ctx)
      • useExoPlayer

         void useExoPlayer(boolean useExoPlayer)

        Enables/disables ExoPlayer (androidx.media's ExoPlayer) to play video. If exoplayer disabled, android default MediaPlayer will be used. Default is true, and it's recommended to not turn it off.

        Parameters:
        useExoPlayer - flag to use ExoPlayer