AATKit Android Integration
Release Notes
  • Start
    • Setup
      • Maven
      • Prerequisites
      • Google Family Safe Apps
    • Initialization
    • Consent
      • General Handling
      • Managed Consent
        • Google CMP
        • Sourcepoint CMP
        • SFBX (AppConsent) CMP
      • Vendor Consent
      • Simple Consent
    • Plugins documentation
    • Additional Information
  • Formats
    • Introduction
    • Banner
      • Auto Load Banner
      • Multi-Size Auto Load Banner
      • Banner Cache
      • Infeed Banner
      • Sticky Banner
      • Multi-Size Banner
    • Fullscreen (Interstitial)
    • AppOpen (Google)
    • Rewarded Video
      • Server-Side Verification (SSV)
    • Native Ad
      • Basic Integration
      • Network Specifics
        • Native Ads: Google
        • Native Ads: ApplovinMax
        • Native Ads: Bluestack
        • Native Ads: FacebookAudienceNetwork
        • Native Ads: Huawei
  • Ad Networks
    • Customize Ad Networks
    • Google Mobile Ads SDK
    • AppLovinMax Ad Review
    • AppNexus special settings
    • FeedAd Shutter Colour and Disabling Spinner
    • Kidoz
  • Advanced
    • Targeting
      • Key-Value Targeting
      • User Targeting
      • Content Targeting URL
    • Frequency Capping
    • Advanced Listeners
      • Reports Delegate
      • Impression Listener (ILRD)
      • Statistics Listener
    • AATKit's Size
    • Ad Space and Fill Rate
    • Shake Debug
    • Child-directed Support
    • Geo Tracking
    • Disabling Ad Networks
    • Huawei Support
    • Creatives History
  • Other
    • AdMob Custom Events
    • Reference
      • Classes
        • AATKit
        • AATKitUserTargeting
        • CollapsibleBannerOptions
        • AATKitDebugScreenConfiguration
        • PlacementDebugInfo
        • AATKitDebugInfo
        • AATKitConfiguration
        • AATKitRuntimeConfiguration
        • ManagedConsent
        • VendorConsent
        • SimpleConsent
        • BannerConfiguration
        • BannerRequest
        • BannerCacheConfiguration
        • AATKitReward
        • NativeAdRating
        • AATKitImpression
        • PriceInfo
        • AdInfo
        • RewardedAdSSVInfo
        • PlacementHistoryInfo
        • AATKitAdNetworkOptions
          • SuperAwesomeOptions
          • FeedAdOptions
          • AppNexusOptions
          • AdMobOptions
          • DFPOptions
      • Interfaces
        • CacheStatusDelegate
        • AATKit.Delegate
        • BannerCache
        • BannerRequestCompletionListener
        • ManagedConsentDelegate
        • VendorConsentDelegate
        • Placement
        • StickyBannerPlacement
        • StickyBannerPlacementListener
        • MultiSizeBannerPlacement
        • MultiSizeBannerPlacementListener
        • InfeedBannerPlacement
        • InfeedBannerPlacementListener
        • BannerRequestDelegate
        • CacheDelegate
        • FullscreenPlacement
        • FullscreenPlacementListener
        • AppOpenAdPlacement
        • AppOpenPlacementListener
        • RewardedVideoPlacement
        • RewardedVideoPlacementListener
        • NativeAdPlacement
        • NativePlacementListener
        • NativeAdData
        • AutoLoadBannerPlacement
        • AutoLoadBannerPlacementListener
        • AutoLoadMultiSizeBannerPlacement
        • AutoLoadMultiSizeBannerPlacementListener
        • ReportsDelegate
        • ImpressionListener
        • StatisticsListener
      • Enumerations
        • AATKitGender
        • AdNetwork
        • ManagedConsentState
        • NonIABConsent
        • BannerPlacementSize
        • BannerSize
        • MediationType
        • ImpressionPricePrecisionType
  • Samples
Powered by GitBook
On this page
  • Create Placement
  • Listen to Callbacks (Optional)
  • Request Ad
  • Display Ad
  • Ad Info
  • Has Ad
  • Complete Code Example
  1. Formats

Fullscreen (Interstitial)

Integrate Fullscreen Ads

Last updated 7 months ago

Fullscreen placements are interstitial ads covering the whole screen of the device. Hence, it might be important to tell your app to stop running, e.g. if it is a car gaming app, or to resume when the interstitial was dismissed by the user. You can configure frequency capping for fullscreen placements within the Dashboard (e.g. show not more than 1 impression per hour), so you don’t need to implement frequency capping yourself.

Create Placement

To create an instance of , use the following API:

FullscreenPlacement placement = AATKit.createFullscreenPlacement("<PLACEMENT_NAME>");
val placement = AATKit.createFullscreenPlacement("<PLACEMENT_NAME>")

Listen to Callbacks (Optional)

Through the use of , you can listen to the different placement callbacks.

placement.setListener(this);
placement.listener = this

Request Ad

You can load ads for the fullscreen placement either automatically or manually. We strongly recommend using the auto reload for fullscreen ads, because a fullscreen should be ready to present when the app triggers its presentation.

Automatic Reload

To automatically load a fullscreen placement, call:

placement.startAutoReload();
placement.startAutoReload()

This way the fullscreen placement will always aim to have an ad ready. Please also remember to stop the auto-reload when it is no longer needed:

placement.stopAutoReload();
placement.stopAutoReload()

The fullscreen placement fires onHaveAd listener method only once per loaded ad. So, Before starting the auto-reload, you should check for ads from the previous load/auto-reload using the placement API.

Manual Load

To manually load the fullscreen placement, call:

placement.reload();
placement.reload()

Display Ad

We strongly recommend calling show() whenever the user triggers the respective event (e.g. clicks a button, starts the next game, and so on). This will ensure proper fill rate statistics on the Dashboard. Do not call show() only, if an ad was loaded successfully before, otherwise, your fill rate statistics will be 100% all the time.

Call show() when your app shall present the fullscreen ad:

placement.show();
placement.show()

The show() method will return a bool value indicating whether the fullscreen placement could be displayed or not. This means whether the fullscreen placement has a ready fullscreen ad or not.

Ad Info

After loading a fullscreen ad, you can access the loaded ad information by accessing the adInfo property of the fullscreen placement:

AdInfo adInfo = fullscreenPlacement.getAdInfo();
val info = fullscreenPlacement.adInfo

Has Ad

The fullscreen placement provides an API to check if it has a loaded ad.

boolean hasAd = placement.hasAd();
val hasAd = placement.hasAd()

Complete Code Example

private FullscreenPlacement placement = AATKit.createFullscreenPlacement("<PLACEMENT_NAME>");

@Override
protected void onResume() {
    super.onResume();
    // [IMPORTANT] Notify AATKit about activity lifecycle
    AATKit.onActivityResume(this);

    // Set placement listener to listen to the callbacks
    placement.setListener(this);
    // Start autoreloading the placement.
    placement.startAutoReload();
}

@Override
protected void onPause() {
    // [IMPORTANT] Stop placement autoreload
    placement.stopAutoReload();
    // [IMPORTANT] Notify AATKit about activity lifecycle
    AATKit.onActivityPause(this);
    super.onPause();
}

private void startNewGame() {
    // An example for showing the fullscreen ad when the user starts a new game
    placement.show();
}

// FullscreenPlacementListener:
@Override
public void onPauseForAd(@NonNull Placement placement) {
    // Ad has been displayed on the screen
}

@Override
public void onResumeAfterAd(@NonNull Placement placement) {
    // Back to the app
}

@Override
public void onHaveAd(@NonNull Placement placement) {
    // The placement has loaded a new ad
}

@Override
public void onNoAd(@NonNull Placement placement) {
    // The placement could not load a new ad
}
private val placement = createFullscreenPlacement("<PLACEMENT_NAME>")

override fun onResume() {
    super.onResume()
    // [IMPORTANT] Notify AATKit about activity lifecycle
    AATKit.onActivityResume(this)

    // Set placement listener to listen to the callbacks
    placement?.listener = this
    // Start autoreloading the placement.
    placement?.startAutoReload()
}

override fun onPause() {
    // [IMPORTANT] Stop placement autoreload
    placement?.stopAutoReload()
    // [IMPORTANT] Notify AATKit about activity lifecycle
    AATKit.onActivityPause(this)
    super.onPause()
}

private fun startNewGame() {
    // An example for showing the fullscreen ad when the user starts a new game
    placement?.show()
}

// FullscreenPlacementListener:
override fun onPauseForAd(placement: Placement) {
    // Ad has been displayed on the screen
}

override fun onResumeAfterAd(placement: Placement) {
    // Back to the app
}

override fun onHaveAd(placement: Placement) {
    // The placement has loaded a new ad
}

override fun onNoAd(placement: Placement) {
    // The placement could not load a new ad
}
FullscreenPlacement
FullscreenPlacementListener
has ad