Skip to content
:docs

Interstitial

Learn how to add and configure an interstitial placement and implement additional features through the SDK interface.

Key features

Interstitial placements cover the app completely and are easy to integrate. Because they overlay your app, you can show them without considering how they fit with the app UI. Choose either a dialog or bottom sheet UI to suit your design.

Integration

Follow these steps to integrate an interstitial placement.

Step 1. Prepare

  • Complete Getting started.
  • Obtain a Unit ID for the interstitial placement (referred to below as YOUR_INTERSTITIAL_UNIT_ID).

Step 2. Allocate and display ads

Follow these steps to allocate and display ads in an interstitial placement.

  1. Choose an interstitial UI type and create BuzzInterstitial.
  • Dialog UI: Call BuzzInterstitial.Builder.buildDialog().
  • Bottom sheet UI: Call BuzzInterstitial.Builder.buildBottomSheet().
  1. Call BuzzInterstitial.load() to allocate an ad.

  2. Call BuzzInterstitial.show(context) to display the ad.

Kotlin
import com.buzzvil.buzzbenefit.BuzzAdError
import com.buzzvil.buzzbenefit.interstitial.BuzzInterstitial
import com.buzzvil.buzzbenefit.interstitial.BuzzInterstitialListener

// SDK를 초기화 하지 않은 경우 null이 반환됩니다.
val buzzAdInterstitial = BuzzInterstitial.Builder(Constant.YOUR_INTERSTITIAL_ID).buildDialog()

buzzAdInterstitial?.load(object: BuzzInterstitialListener() {
    override fun onAdLoaded() {
        // 할당된 광고가 있으면 호출됩니다.
        // Interstitial 광고를 화면에 표시합니다.
        buzzAdInterstitial.show(this@MainActivity)
    }

    override fun onAdLoadFailed(error: BuzzAdError?) {
        // 할당된 광고가 없으면 호출됩니다.
        Toast.makeText(this@MainActivity, "onFailure: ${error?.type?.name}", Toast.LENGTH_SHORT).show()
    }

    override fun onAdClosed() {
        super.onAdClosed()
        // Interstitial 지면이 종료되면 호출됩니다.
        // 필요에 따라 추가 기능을 구현하세요.
    }
})

Change the BuzzBenefit entry point UI color

The interstitial placement includes a UI element that directs users to BenefitHub. Clicking this entry point opens BenefitHub.

The primary colors of the interstitial placement follow the global theme. See Global theme for details.

Step 3. Test the basic integration

After completing the basic integration, check that ads are allocated and displayed correctly. Also verify that clicking the BenefitHub entry point opens BenefitHub.

Additional features

Set the number of ads

A bottom sheet interstitial can display up to five ads from a single ad request.

The number of ads can be configured on Buzzvil's server without code changes. To display multiple ads, send your preferred number to your Buzzvil representative at help@buzzvil.com.