Class POBInterstitial

  • All Implemented Interfaces:
    com.pubmatic.sdk.openwrap.core.POBBidEvent

    @MainThread() 
    public class POBInterstitial
     implements POBBidEvent
                        

    Displays full-screen interstitial ads.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class POBInterstitial.POBVideoListener

      Static member class for interaction with the POBInterstitial instance for video events. These events will only invoked for VAST based video creative. All methods are guaranteed to occur on the main thread.

      public class POBInterstitial.POBInterstitialListener

      Static member class for interaction with the POBInterstitial instance. All methods are guaranteed to occur on the main thread.

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void loadAd() Initiate the loading of an interstitial ad
      void loadAd(@NonNull() String bidResponse) Initiates the loading of a interstitial ad with oRTB bid response.
      POBImpression getImpression() Returns an instance of POBImpression which gets created internally.
      POBRequest getAdRequest() Returns an instance of POBRequest, required for setting targeting parameters.
      void show() Presents an interstitial ad in full screen view until the user dismisses it.
      boolean isReady() Method to check whether the ad is loaded and ready to show InterstitialAd.
      void setListener(@Nullable() POBInterstitial.POBInterstitialListener listener) Sets instance of POBInterstitialListener for getting callbacks
      void setVideoListener(@Nullable() POBInterstitial.POBVideoListener listener) Sets instance of POBVideoListener for getting callbacks of VAST based video ad
      boolean proceedToLoadAd()
      void proceedOnError(@NonNull() POBBidEvent.BidEventError error, @NonNull() String errorMessage)
      POBBid getBid() Get bid
      void destroy() Invoke this method when your activity/fragment is about to destroy.
      void setBidEventListener(@Nullable() POBBidEventListener bidEventListener) Sets the BidEventListener for the ad view Note: Proper reference management practices should be observed when using this listener
      • Methods inherited from class java.lang.Object

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

      • POBInterstitial

        POBInterstitial(Context context, String publisherId, int profileId, String adUnitId)
        Constructor.
        Parameters:
        context - Activity context
        publisherId - Identifier of the publisher
        profileId - Profile ID of an ad tag
        adUnitId - Ad unit id used to identify unique placement on screen
      • POBInterstitial

        POBInterstitial(Context context)
        Constructor.
        Parameters:
        context - Activity context
      • POBInterstitial

        POBInterstitial(Context context, String publisherId, int profileId, String adUnitId, POBInterstitialEvent listener)
        Constructor.
        Parameters:
        context - Activity context
        publisherId - Identifier of the publisher
        profileId - Profile ID of an ad tag
        adUnitId - Ad unit id used to identify unique placement on screen
        listener - Valid instance of POBInterstitialEvent
    • Method Detail

      • loadAd

        @RequiresPermission(value = "android.permission.INTERNET") void loadAd()

        Initiate the loading of an interstitial ad

      • loadAd

        @RequiresPermission(value = "android.permission.INTERNET") void loadAd(@NonNull() String bidResponse)

        Initiates the loading of a interstitial ad with oRTB bid response. This API expects the response with oRTB v2.5 specification.

        Parameters:
        bidResponse - oRTB response of format - oRTB-2.5
      • getImpression

        @Nullable() POBImpression getImpression()

        Returns an instance of POBImpression which gets created internally. POBImpression provides the APIs to set PubMatic zone id and other custom parameters.

        Returns:

        Returns an instance of POBImpression.

      • getAdRequest

        @Nullable() POBRequest getAdRequest()

        Returns an instance of POBRequest, required for setting targeting parameters.

        Returns:

        Instance of POBRequest

      • show

         void show()

        Presents an interstitial ad in full screen view until the user dismisses it. Calling this method has no effect until the ad is received i.e. onAdReceived() gets called. Recommended to check if isReady() returns true before calling show().

      • isReady

         boolean isReady()

        Method to check whether the ad is loaded and ready to show InterstitialAd.

        Returns:

        Returns true if the interstitial is ready to be displayed else returns false.

      • destroy

         void destroy()

        Invoke this method when your activity/fragment is about to destroy. It cleans the resources.

      • setBidEventListener

         void setBidEventListener(@Nullable() POBBidEventListener bidEventListener)

        Sets the BidEventListener for the ad view Note: Proper reference management practices should be observed when using this listener

        Parameters:
        bidEventListener - reference of POBBidEventListener