Focus mode

Banner / MREC

Available banner ad sizes:

Banner SizeDescriptionDevicesAdSize constant
320x50BannerPhone and TabletBANNER_320x50
728X90BannerTabletsBANNER_728x90
-Smart BannerPhone and TabletSMART_BANNER
300x250IAB Medium RectanglePhone and TabletBANNER_300x250

Setup Banner

Create a banner using your Tappx key, set the size, add it to the view and request an ad using .loadAd() method.

TappxBanner banner = new TappxBanner(context, "**YOUR-APP-KEY**");
banner.setAdSize(AdSize.SMART_BANNER);
banner.loadAd();
val banner = TappxBanner(this, "**YOUR-APP-KEY**")
banner.setAdSize(AdSize.SMART_BANNER)
banner.loadAd()

TIP: we recommend sending additional information with your ad requests to improve performance. Check Advanced Settings section.

Set Listeners

banner.setListener(new TappxBannerListener() {
       @Override
       public void onBannerLoaded(TappxBanner tappxBanner) {
           Log.v("TappxSDK", "Tappx: onBannerLoaded");
       }
       @Override
       public void onBannerLoadFailed(TappxBanner tappxBanner, TappxAdError tappxAdError) {
           Log.v("TappxSDK", "Tappx: onBannerLoadFailed " + tappxAdError);
       }
       @Override
       public void onBannerClicked(TappxBanner tappxBanner) {
           Log.v("TappxSDK", "Tappx: onBannerClicked");
       }
       @Override
       public void onBannerExpanded(TappxBanner tappxBanner) {
           Log.v("TappxSDK", "Tappx: onBannerExpanded");
       }
       @Override
       public void onBannerCollapsed(TappxBanner tappxBanner) {
           Log.v("TappxSDK", "Tappx: onBannerCollapsed");
       }
});
banner.setListener(object : TappxBannerListener {
       override fun onBannerLoaded(tappxBanner: TappxBanner) {
              Log.v("TappxSDK", "Tappx: onBannerLoaded")
       }
       override fun onBannerLoadFailed(tappxBanner: TappxBanner, tappxAdError: TappxAdError) {
              Log.v("TappxSDK", "Tappx: onBannerLoadFailed $tappxAdError")
       }
       override fun onBannerClicked(tappxBanner: TappxBanner) {
              Log.v("TappxSDK", "Tappx: onBannerClicked")
       }
       override fun onBannerExpanded(tappxBanner: TappxBanner) {
              Log.v("TappxSDK", "Tappx: onBannerExpanded")
       }
       override fun onBannerCollapsed(tappxBanner: TappxBanner) {
              Log.v("TappxSDK", "Tappx: onBannerCollapsed")
       }
})

Destroy (Recommended)

After ad was successful shown and no longer needed, it can be destroyed.

banner.destroy();
banner.destroy()

Setting up the Endpoint (Recommended)

Please, if you don’t have an Endpoint contact our supply team at sdk@tappx.com.

You can set your Endpoint when requesting ads from your app project. Add the following lines:

banner.loadAd(new AdRequest().setEndpoint("[ENDPOINT]"));
banner.loadAd(AdRequest().setEndpoint("[ENDPOINT]"))

Refreshing ads

By default, banner ads periodically change every 30 seconds. To set the frequency of ad refresh use the following: 

banner.setRefreshTimeSeconds(45);
banner.setRefreshTimeSeconds(45)

The minimum refresh time is 30 seconds and the maximum is 150 seconds.

To disable automatic ad refresh, use:

banner.setEnableAutoRefresh(false);
banner.setEnableAutoRefresh(false)

Examples on GitHub

Banner ads example: Java | Kotlin

MREC ads example: Java | Kotlin

Complete demo: Java | Kotlin

Banner / MREC
×

Tappx logo white

Important Security Notice
Beware of scammers impersonating Tappx brand

We have identified fraudulent activities where malicious actors are imitating Tappx assets. These scams may compromise your security.

⚠️ Warning: The URL you came from has been flagged as potentially harmful. 

To stay safe, only trust communications and services from the official Tappx domain: tappx.com

×

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Etiam elit tortor, consequat sit amet ultricies ut, pellentesque a magna. Etiam mattis odio ut nibh pulvinar bibendum. Curabitur porta gravida urna sit amet tincidunt. Etiam sit amet nunc vulputate, blandit mauris sit amet, lacinia arcu. Morbi in orci tincidunt, tincidunt dolor vitae, hendrerit sem. Etiam in suscipit purus. Morbi dignissim vitae nibh ut condimentum.

Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.