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

Was this helpful?

  1. Android
  2. 네이티브 광고 미디에이션 레이아웃 가이드

NAM - GfpNativeAdView

Android 네이티브 광고 미디에이션 레이아웃 가이드 입니다.

Simple 형태(템플릿) 광고가 아닌 직접 UI Component Layout을 지정하는 방식만 사용하고자 할 경우에는 아래와 같이 사용하면 됩니다.

  1. XML 구조 예시

공통 설정 부분에서 NAM 설정 부분만을 요약하면 아래와 같이 설정됩니다. GfpNativeAdView 영역을 추가해 주세요

  • 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 NativeAd -->
    <com.naver.gfpsdk.GfpNativeAdView
        android:id="@+id/gfp_native_ad"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <include layout="@layout/nam_native_ad_unit_layout"/>
    </com.naver.gfpsdk.GfpNativeAdView>
...
</com.igaworks.ssp.part.nativead.AdPopcornSSPNativeAd>
  • nam_native_ad_unit_layout.xml 샘플

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/nam_assets_container"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:background="#FFFFFF"
        android:minHeight="50dp"
        android:orientation="vertical">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:padding="10dp">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="12dp"
                android:orientation="horizontal">

                <ImageView
                    android:id="@+id/nam_ad_app_icon"
                    android:layout_width="46dp"
                    android:layout_height="46dp"
                    android:layout_marginRight="10dp"
                    android:adjustViewBounds="true" />

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:layout_weight="1"
                    android:orientation="vertical">

                    <TextView
                        android:id="@+id/nam_ad_headline"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginBottom="4dp"
                        android:ellipsize="end"
                        android:lines="1"
                        android:textColor="#000000"
                        android:textSize="12dp" />
                </LinearLayout>

                <com.naver.gfpsdk.GfpAdChoicesView
                    android:id="@+id/nam_ad_choices_view"
                    android:layout_width="20dp"
                    android:layout_height="20dp"
                    android:layout_gravity="center_vertical"
                    android:layout_marginLeft="10dp" />

            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">

                <TextView
                    android:id="@+id/nam_ad_body"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="12dp"
                    android:ellipsize="end"
                    android:maxLines="2"
                    android:textColor="#000000"
                    android:textSize="15dp" />

                <!--
                    if there is no media view
                        new GfpNativeAdOptions.Builder().setHasMediaView(false)
                    this should be deleted
                -->
                <com.naver.gfpsdk.GfpMediaView
                    android:id="@+id/nam_ad_media"
                    android:layout_width="match_parent"
                    android:layout_height="220dp"
                    android:layout_marginBottom="12dp"
                    android:adjustViewBounds="true" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal">

                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_weight="3"
                        android:orientation="vertical">

                        <TextView
                            android:id="@+id/nam_ad_advertiser"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:ellipsize="end"
                            android:lines="1"
                            android:textColor="@android:color/darker_gray"
                            android:textSize="13dp" />

                        <TextView
                            android:id="@+id/nam_ad_social_context"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:ellipsize="end"
                            android:gravity="center_vertical"
                            android:lines="1"
                            android:textColor="@android:color/black"
                            android:textSize="13dp" />

                    </LinearLayout>

                    <Button
                        android:id="@+id/nam_ad_call_to_action"
                        android:layout_width="100dp"
                        android:layout_height="40dp"
                        android:layout_gravity="center_vertical"
                        android:layout_weight="1"
                        android:background="@color/colorPrimary"
                        android:paddingLeft="3dp"
                        android:paddingRight="3dp"
                        android:textColor="#ffffff"
                        android:textSize="13dp" />

                </LinearLayout>

            </LinearLayout>
        </LinearLayout>
    </LinearLayout>

</FrameLayout>

  1. 코드 연동

// NAM - Gfp Native Ad
NAMViewBinder namViewBinder = new NAMViewBinder.Builder(R.id.gfp_native_ad, R.layout.nam_native_ad_unit_layout, true)
                .assetContainerViewId(R.id.nam_assets_container)
                .adChoicesViewId(R.id.nam_ad_choices_view)
                .advertiserViewId(R.id.nam_ad_advertiser)
                .bodyViewId(R.id.nam_ad_body)
                .iconViewId(R.id.nam_ad_app_icon)
                .mediaViewId(R.id.nam_ad_media)
                .titleViewId(R.id.nam_ad_headline)
                .callToActionButtonViewId(R.id.nam_ad_call_to_action)
                .socialContextViewId(R.id.nam_ad_social_context)
                .activateObservingOnBackground(true)
                .build();
 adPopcornSSPNativeAd.setNamViewBinder(namViewBinder);

viewBinder Builder 생성 시, GfpNativeAdView id, native adview의 layout, hasMediaView 설정값을 반드시 넘겨줍니다.

GfpNativeAdView 의 경우에는 각각의 ui component를 viewBinder에 추가로 세팅해 주어야 합니다. 위 코드를 참고하여 세팅해 주세요.

PreviousNAM - GfpNativeSimpleAdViewNextAppLovinMax

Last updated 22 days ago

Was this helpful?