Skip to main content

Android Banner Integration

Create a Banner Object#

info

If you miss to Initialize the SDK, this method will fail to return a response.

Select the mediation platform:

To implement a Banner bidder object for GAM follow:

val mesonGAMBanner = MesonGAMBanner("<Adunit Id>", AdSize(<width>, <height>))

Fetch a Bid#

Select the mediation platform:

To fetch a bid for GAM follow:

//Fetch bid by supplying publisher created DFP's PublisherAdRequestBuilder instance.
mesonGAMBanner.fetchBid(pubInstance, object : MesonAdFetchListener<PublisherAdRequest.Builder> {
override fun onComplete(obj: PublisherAdRequest.Builder, error: Error?) {
val publisherAdRequest: PublisherAdRequest = obj.build()
//Load with publisher created dfpBanner instance
dfpBanner.loadAd(publisherAdRequest);
}
})
What Next?

Next, let's integrate Interstitial ad units, or Manage Demand and Configure your Ad Server.