애드팝콘 SSP SDK 연동가이드
애드팝콘 홈페이지애드팝콘 SSP 콘솔 바로가기
  • 개요
  • Android
    • 기본 설정
    • 배너 광고
    • 전면 광고
    • 전면 비디오 광고
    • 리워드 비디오 광고
    • 비디오 믹스 광고
    • 보상형 광고 플러스 연동(v1.0)
    • 보상형 광고 플러스 연동(v1.5)
    • 네이티브 광고
      • 네이티브 광고 레이아웃 구성 가이드
        • AdPopcornSSP NativeAdView
    • 스플래시 광고
    • 모달 광고
    • 팝콘텐츠 광고
    • 응답 에러 코드 및 샘플 프로젝트
    • 미디에이션(Android)
      • AdFit
      • Admob
      • AdForus
      • ADOP
      • GAM (Google Ad Manager)
      • Cauly
      • FAN(Facebook Audience Network)
      • MezzoMedia
      • Mintegral
      • Mobwith
      • UnityAds
      • Vungle(LiftOff)
      • Fyber
      • Pangle
      • AppLovin
      • AppLovinMax
      • NAM (Naver Ad Manager)
      • CoupangCPM
    • AppLovin Max Android Mediation 가이드
    • 릴리즈 노트
  • iOS
    • 기본 설정
      • CocoaPod 설치
      • SPM 설치
      • 수동 설치
    • 배너 광고
    • 전면 광고
    • 전면 비디오 광고
    • 리워드 비디오 광고
    • 비디오 믹스 광고
    • 보상형 광고 플러스 연동(1.0)
    • 보상형 광고 플러스 연동(v1.5)
    • 네이티브 광고
      • NativeAdView layout
        • 직접 설정
        • 템플릿 사용
    • 스플래시 광고
    • 모달 광고
    • 팝콘텐츠 광고
    • 응답 에러 코드 및 샘플 프로젝트
    • 미디에이션
      • NAM (Naver Ad Manager)
      • AdFit
      • AppLovin
      • AppLovinMAX
      • UnityAds
      • Vungle
      • FBAudienceNetwork (FaceBook)
      • AdMob
      • Google AdManager(GAM)
      • ADOP
      • Fyber
      • Mezzo
      • Mintegral
      • Pangle
      • Cauly
      • SDK, Mediation ver 호환성
    • AppLovin Max iOS Mediation 가이드
    • 릴리즈노트
  • Unity
    • Unity (Android)
      • 기본 설정
      • 배너 광고
      • 전면 광고
      • 리워드 비디오 광고
      • 비디오 믹스 광고
      • 네이티브 광고
      • 보상형 광고 플러스 연동(v1.0)
      • 보상형 광고 플러스 연동(v1.5)
      • 미디에이션 Unity Android
    • Unity (iOS)
      • 기본 설정
      • 배너 광고
      • 전면 광고
      • 리워드 비디오 광고
      • 비디오 믹스 광고
      • 네이티브 광고
      • 보상형 광고 플러스 연동(v1.0)
      • 보상형 광고 플러스 연동(v1.5)
      • 미디에이션 Unity iOS
    • 에러 코드
  • Flutter
    • 기본 설정
    • 배너 광고
    • 전면 광고
    • 전면 비디오 광고
    • 리워드 비디오 광고
    • 보상형 광고 플러스 연동(beta)
    • 네이티브 광고
    • 팝콘텐츠 광고
  • React Native(beta)
    • 기본 설정
    • 배너 광고
    • 전면 광고
    • 전면 비디오 광고
    • 리워드 비디오 광고
    • 네이티브 광고
  • Web SDK
  • 하이브리드 앱 - Web(APM + NAM)
    • 네이티브 Side 연동(Android)
    • 네이티브 Side 연동(iOS)
    • WebPage Side 연동
    • 광고 ID 수동 세팅
  • 하이브리드 앱- Web(Adfit)
    • Android
    • iOS
  • 테스트 코드
  • 리포트 API
    • 애드팝콘 SSP Report API
    • DSP Report API
    • Publisher API (Report)
    • Publisher API (Metadata)
    • Adserver Report API
    • Popcontent Report API
  • 추가 기능 연동가이드
    • Adfit Bizboard Android 연동 가이드
    • 웹 CS 페이지 연동
    • AppLovin Custom Network
      • Android
      • iOS
    • KT Library
    • 원스토어 연동가이드
      • 애드팝콘 SSP SDK for Onestore
      • 원스토어 Ads 래핑 가이드(내부용)
        • 배너 광고
        • 전면 광고
        • 전면 비디오 광고
        • 리워드 비디오 광고
        • 네이티브 광고
        • SSP 미디에이션
        • 에러 코드 및 외부 노출 함수
        • 테스트 지면 키
        • AAR 라이브러리 목록
    • 쿠팡 연동가이드
      • 쿠팡 포스트백 연동
      • 쿠팡 EP 리스트 연동
      • 쿠팡 리포트 API 연동
        • 쿠팡 일별 리포트 API
        • 쿠팡 API - Report
        • 쿠팡 API - Product list
    • Reward Banner 스크립트 연동가이드
      • Reward Banner 스크립트 Android
      • Reward Banner 스크립트 iOS
    • 차단관리 파일 가이드
    • 커스텀 타입 연동 가이드
      • 커스텀 타입(Android)
      • 커스텀 타입(iOS)
    • 쿠팡 클릭 이벤트 페이지 연동 가이드
  • 팝콘텐츠 연동가이드
    • WebView 직접 연동
    • 리워드 콜백
  • 웹 SSP
    • 쿠키 매칭
    • Web Header Bidding(WIP)
Powered by GitBook
On this page
  • SDK 설치
  • 배너 추가 설정
  • 네이티브 광고 추가 설정
  • BizBoard
  • 직접 연동

Was this helpful?

  1. Android
  2. 미디에이션(Android)

AdFit

SDK 설치

  • v3.17.2 호환 지원합니다.

api 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.10'
api 'com.kakao.adfit:ads-base:3.17.2'
  • build.gradle 프로젝트 레벨에 저장소 설정을 추가합니다.

allprojects {
    repositories {
        maven { url 'https://devrepo.kakao.com/nexus/content/groups/public/' }
    }
}

배너 추가 설정

AdFit 배너 광고를 사용하는 지면에서는 아래의 추가 코드 연동이 필요합니다. AdPopcornSSPBannerAd 인스턴스의 onResume, onPause를 activity life cycle에 맞추어 호출해 줍니다.

MainActivity.java
@Override
protected void onResume() {
    super.onResume();
    if(bannerAdView != null)
        bannerAdView.onResume();
}

@Override
protected void onPause() {
    super.onPause();
    if(bannerAdView != null)
        bannerAdView.onPause();
}

네이티브 광고 추가 설정

다른 타입의 광고와 다르게 네이티브 광고에서 미디에이션 사용하고자 할 경우에는 레이아웃에 대한 추가 설정이 필요합니다.

AdFit 네이티브의 경우 일반 네이티브와 BizBoard 네이티브를 지원하므로, 매체에서 사용하고자 하는 방식에 맞게 연동을 진행해 주세요.

BizBoard

AdPopcornSSPNativeAd layout 내에 AdFitBizBoardAdTemplateLayout 영역을 추가해 주세요

  • native_ad_mediation_layout.xml 샘플

<?xml version="1.0" encoding="utf-8"?>
<com.igaworks.ssp.part.nativead.AdPopcornSSPNativeAd
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/adpopcorn_native_ad"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
    ...
    <!-- AdFit BizBoard -->
    <com.kakao.adfit.ads.na.AdFitBizBoardAdTemplateLayout
        android:id="@+id/adFitNativeAdView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>
...
</com.igaworks.ssp.part.nativead.AdPopcornSSPNativeAd>

그리고 지정한 영역을 아래와 같이 setAdFitViewBinder를 통해 BizBoard 영역이라고 설정합니다.

AdFitViewBinder adFitViewBinder = new AdFitViewBinder.Builder(R.id.adFitNativeAdView)
                .bizBoardAd(true)
                .build();
adPopcornSSPNativeAd.setAdFitViewBinder(adFitViewBinder);

AdFitViewBinder Builder 생성 시, view id(R.id.adFitNativeAdView)는 필수로 넘겨주어야 하며, bizBoardAd(true)를 반드시 설정해야 합니다.

직접 연동

AdPopcornSSPNativeAd layout 내에 GfpNativeSimpleAdView 영역을 추가해 주세요

  • native_ad_mediation_layout.xml 샘플

<?xml version="1.0" encoding="utf-8"?>
<com.igaworks.ssp.part.nativead.AdPopcornSSPNativeAd
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/adpopcorn_native_ad"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
    ...
    <!-- NAM SimpleAd -->
    <com.naver.gfpsdk.GfpNativeSimpleAdView
        android:id="@+id/gfp_native_simple_ad"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
    </com.naver.gfpsdk.GfpNativeSimpleAdView>
...
</com.igaworks.ssp.part.nativead.AdPopcornSSPNativeAd>

  • adfit_native_ad_unit_layout.xml 샘플

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="3dp"
        android:gravity="center_vertical"
        android:orientation="horizontal">

        <ImageView
            android:id="@+id/adfit_profile_icon_view"
            android:layout_width="50dp"
            android:layout_height="50dp"
            android:contentDescription="AD Profile Icon"
            tools:src="@mipmap/ic_launcher" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="7dp"
            android:layout_marginRight="7dp"
            android:gravity="center_vertical"
            android:orientation="vertical">

            <TextView
                android:id="@+id/adfit_title_view"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textStyle="bold"
                tools:text="AD Title" />

            <TextView
                android:id="@+id/adfit_profile_name_view"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                tools:text="AD Profile Name" />
        </LinearLayout>
    </LinearLayout>

    <com.kakao.adfit.ads.na.AdFitMediaView
        android:id="@+id/adfit_media_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="3dp" />

    <TextView
        android:id="@+id/adfit_body_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="3dp"
        tools:text="AD Description" />

    <Button
        android:id="@+id/adfit_call_to_action_button"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        tools:text="AD Call To Action Button" />
</LinearLayout>

xml에서 생성한 ui component를 sdk에서 제공하는 setAdFitViewBinder API를 이용해 아래와 같이 설정해 줍니다.

AdFitViewBinder adFitViewBinder = new AdFitViewBinder.Builder(R.id.adFitNativeAdView, R.layout.adfit_native_ad_unit_layout)
        .titleViewId(R.id.adfit_title_view)
        .bodyViewId(R.id.adfit_body_view)
        .profileIconViewId(R.id.adfit_profile_icon_view)
        .profileNameViewId(R.id.adfit_profile_name_view)
        .callToActionButtonId(R.id.adfit_call_to_action_button)
        .mediaViewId(R.id.adfit_media_view)
				.testMode(false)
        .build();
adPopcornSSPNativeAd.setAdFitViewBinder(adFitViewBinder);

AdFitViewBinder Builder 생성 시, view id(R.id.adFitNativeAdView)와 layout id(R.layout.adfit_native_ad_unit_layout)는 필수로 넘겨주어야 하며, 그 외 ui component에 대해서는 사용하는 리소스에 대해서만 설정해 주면 됩니다.

테스트 광고 송출을 원할 경우, testMode에 true 값을 전달하여 준다.

Previous미디에이션(Android)NextAdmob

Last updated 1 month ago

Was this helpful?

AdFit 비즈보드 스타일의 경우 UI 템플릿을 직접 설정할 필요가 없기에 native_ad_mediation_layout파일 안에 영역만 지정해 주면 됩니다.