Class GamBannerEventHandler

java.lang.Object
org.prebid.mobile.eventhandlers.GamBannerEventHandler

public class GamBannerEventHandler extends Object
Banner event handler for communication between Prebid rendering API and the GAM SDK. It implements the Prebid Rendering SDK EventHandler interface. Prebid Rendering SDK notifies (using EventHandler interface) to make a request to GAM SDK and pass the targeting parameters. This class also creates the GAM's PublisherAdViews, initializes them and listens for the callback methods. And pass the GAM ad event to Prebid Rendering SDK via BannerEventListener.
  • Constructor Details

    • GamBannerEventHandler

      public GamBannerEventHandler(android.content.Context context, String gamAdUnitId, AdSize... adSizes)
      Parameters:
      context - activity or application context.
      gamAdUnitId - GAM AdUnitId.
      adSizes - ad sizes for banner.
  • Method Details

    • convertGamAdSize

      public static AdSize[] convertGamAdSize(com.google.android.gms.ads.AdSize... sizes)
    • onEvent

      public void onEvent(AdEvent adEvent)
    • getAdSizeArray

      public AdSize[] getAdSizeArray()
    • setBannerEventListener

      public void setBannerEventListener(BannerEventListener bannerViewListener)
    • requestAdWithBid

      public void requestAdWithBid(Bid bid)
    • trackImpression

      public void trackImpression()
    • destroy

      public void destroy()