Class BaseInterstitialAd

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected BaseInterstitialAd​(int slotId, java.lang.String format, android.content.Context context)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void destroy()
      Close, destroy the ad and free resources
      void dismiss()
      Close screen with ad
      java.lang.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.
      void handleSection​(InterstitialAdSection section)  
      boolean isMediationEnabled()
      Get enable/disable mediation flag
      boolean isUseExoPlayer()
      Gets current flag of using ExoPlayer for video playing
      void load()
      Start loading ads.
      void loadFromBid​(java.lang.String bidId)
      Start loading ad with the bidding ID
      void setMediationEnabled​(boolean mediationEnabled)
      Enables/disables mediation for current ad.
      void show()
      Show screen with ad
      void show​(android.content.Context ctx)  
      void useExoPlayer​(boolean useExoPlayer)
      Enables/disables ExoPlayer to play video.
      • Methods inherited from class java.lang.Object

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

      • BaseInterstitialAd

        protected BaseInterstitialAd​(int slotId,
                                     @NonNull
                                     java.lang.String format,
                                     @NonNull
                                     android.content.Context context)
    • Method Detail

      • useExoPlayer

        public void useExoPlayer​(boolean useExoPlayer)
        Enables/disables 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
        See Also:
        Android MediaPlayer, ExoPlayer
      • isUseExoPlayer

        public boolean isUseExoPlayer()
        Gets current flag of using ExoPlayer for video playing
        Returns:
        param of using ExoPlayer
      • setMediationEnabled

        public 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
      • isMediationEnabled

        public boolean isMediationEnabled()
        Get enable/disable mediation flag
        Returns:
        flag
      • load

        public 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

        public void loadFromBid​(@NonNull
                                java.lang.String bidId)
        Start loading ad with the bidding ID
        Parameters:
        bidId - bidding ID
      • handleSection

        public final void handleSection​(@NonNull
                                        InterstitialAdSection section)
      • show

        public void show()
        Show screen with ad
      • show

        public void show​(@Nullable
                         android.content.Context ctx)
      • dismiss

        public void dismiss()
        Close screen with ad
      • destroy

        public void destroy()
        Close, destroy the ad and free resources
      • getAdSource

        @Nullable
        public java.lang.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

        public 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