Banner Ads

Banners are rectangular ads that appear at the top or bottom of the screen when the user interacts with your app. The user can view banners but cannot dismiss them. The DT FairBid SDK automatically refreshes banners after 20 seconds.

circle-info

The DT FairBid SDK automatically refreshes banners. To avoid discrepancies between DT and third-party network reporting, disable any automatic or manual banner refresh settings on third-party network SDKs.

Showing a Banner

Implement the code below to show a Banner:

Kotlin
val placementId = "12345"
Banner.show(placementId, activity)
Java
String placementId = "12345";
Banner.show(placementId, activity);

Hiding the Banner

If you want to hide the banner temporarily, implement the code below:

Kotlin
//hides the banner for a specific placement
val placementId = "12345"
Banner.hide(placementId)
Java
//hides the banner for a specific placement
String placementId = "12345";
Banner.hide(placementId);

Destroying the Banner

Once you have decided that you no longer want to use the banner, you must destroy it.

To destroy the banner, implement the code below:

You can show your banner at the top or bottom of your screen. If you want to change this behavior, use the following code:

Top

Custom View

Loading a Banner

circle-exclamation

If you want to use DT FairBid with other mediations or demand sources, you can pre-load a banner to review its pricing and other details. This allows you to compare it against banners from other demand sources outside our platform before showing it.

To load a banner, create a BannerView object instance and then call the load method. Please be aware that this integration method disables banner refresh, and you must add your own refresh logic.

This is supported starting DT FairBid Android SDK 3.51.0.

Adaptive Banners

By enabling the adaptive banner feature, you can receive the best banner size based on the ad width and screen size. This feature is currently supported by Google AdMob, Google Bidding, and Google Ad Manager only. This feature is disabled by default.

Networks that support adaptive banners will return ads with the best-fit height based on your banner size. Other networks will continue to deliver banners according to the specified ad size.

To use this feature, add the adaptive flag when defining your banner size using the code below:

Adding Callbacks

The callback code below is required for the SDK to properly track the activity of your ad.

Last updated